473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

With what language was C# created

Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam
Nov 15 '05 #1
13 7740
"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?


Probably C++, and then C#.
Nov 15 '05 #2
its made totally in the greatest language ever : C++ :)
And since u dont know which language it was made in, u also probably dont
kow that its open source. Check out its lovely source in Rotor
http://research.microsoft.com/collab...ope/rfp/rotor/.

Abubakar.

"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam

Nov 15 '05 #3
I spoke with Anders Hjelsberg one time and he said with somewhat of a wry
smile that the C# compiler was actually written in C#.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam

Nov 15 '05 #4

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:Ob****************@TK2MSFTNGP10.phx.gbl...
I spoke with Anders Hjelsberg one time and he said with somewhat of a wry
smile that the C# compiler was actually written in C#.


ISTR a story I've heard once about the Pascal compiler (the first one) which
was written on paper, and then the author run the compiler through the
compiler (in its head) to compile.
Nov 15 '05 #5
Sort of a Chicken and Egg problem isn't it. When you think about it, it
does not really matter. The language is just a specification. So you have
a bunch of text in a file that needs to get compiled into IL. So if you had
nothing better to do, I guess you could write a C# compiler in Perl or even
DOS batch language to output the IL. Is the cs compiler written in C#?
Don't know for sure, but some have suggested it is. Cheers!

--
William Stacey, MVP

"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam

Nov 15 '05 #6
"William Stacey" <st***********@mvps.org> wrote in message
news:eJ**************@TK2MSFTNGP11.phx.gbl...
Is the cs compiler written in C#?
Don't know for sure, but some have suggested it is. Cheers!


If it was, how did they compile it? 0:-)
--
Daisy The Cow
Nov 15 '05 #7
Hi.

I'm quite sure that the C# compiler is written in C++ (it's unmanaged code,
however). In particular, if you go to the folder that contains the csc.exe
executable, you will find that the main part of the compiler is in the
unmanaged DLL cscomp.dll. In the same folder you will find a managed wrapper
for cscomp.dll, which is called cscompmgd.dll, that contains some types of
the Microsoft.CSharp namespace.

However, it's true that some compilers are written in the same language they
compile. Apart from the C/C++ compilers (quite obviously) the Garden Point
Component Pascal compiler (by John Gough), for example, is written in
Component Pascal.

Have a nice day
GV

"Ayende Rahien" <Ay****@no.spam> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:Ob****************@TK2MSFTNGP10.phx.gbl...
I spoke with Anders Hjelsberg one time and he said with somewhat of a wry smile that the C# compiler was actually written in C#.
ISTR a story I've heard once about the Pascal compiler (the first one)

which was written on paper, and then the author run the compiler through the
compiler (in its head) to compile.

Nov 15 '05 #8
IIRC, the MS C# compiler was written in C++(isn't there an example CSC in
rotor?), probably based off of a grammer run through bison or something. The
Mono C# compiler(and most of mono itself) is written in C#, originally using
MS's C# compiler, however it compiles itself now.
Future C# compilers can easily be writtenin C#(it's unlikely MS will switch
though), though for new languages targetting the framework, C# seems ideal.

"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam

Nov 15 '05 #9
The Visual C# compiler is written in C++. We could have written it in C#,
bootstrapping our way up, but because that is much more time consuming and
difficult, we elected to stick with C++. We may revisit that in the future.

The JScript compiler is written in C#.

--
Eric Gunnerson

Visit the C# product team at http://www.csharp.net
Eric's blog is at http://blogs.gotdotnet.com/ericgu/

This posting is provided "AS IS" with no warranties, and confers no rights.
"Sam Sungshik Kong" <ss*@chol.net> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Hi!

This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?

I am just curious.

Sam

Nov 15 '05 #10
The C# compiler for the Mono project is written in C# so why couldn't
Microsoft's be written in C#. The .Net frameworks class
System.Reflection.Emit handles most of the issues for creating the IL code.

Gianluca Varenni wrote:
Hi.

I'm quite sure that the C# compiler is written in C++ (it's unmanaged code,
however). In particular, if you go to the folder that contains the csc.exe
executable, you will find that the main part of the compiler is in the
unmanaged DLL cscomp.dll. In the same folder you will find a managed wrapper
for cscomp.dll, which is called cscompmgd.dll, that contains some types of
the Microsoft.CSharp namespace.

However, it's true that some compilers are written in the same language they
compile. Apart from the C/C++ compilers (quite obviously) the Garden Point
Component Pascal compiler (by John Gough), for example, is written in
Component Pascal.

Have a nice day
GV

"Ayende Rahien" <Ay****@no.spam> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:Ob****************@TK2MSFTNGP10.phx.gbl.. .
I spoke with Anders Hjelsberg one time and he said with somewhat of a
wry
smile that the C# compiler was actually written in C#.


ISTR a story I've heard once about the Pascal compiler (the first one)


which
was written on paper, and then the author run the compiler through the
compiler (in its head) to compile.



Nov 15 '05 #11
Well, the mono compiler was originally compiled with the MS compiler(IIRC),
what exactly would they compile css with?(or for that matter,
System.Reflection.Emit...that may not be written in C++ either, I don't know
off hand).
"Leon Lambert" <la******@inil.com> wrote in message
news:um**************@TK2MSFTNGP10.phx.gbl...
The C# compiler for the Mono project is written in C# so why couldn't
Microsoft's be written in C#. The .Net frameworks class
System.Reflection.Emit handles most of the issues for creating the IL code.
Gianluca Varenni wrote:
Hi.

I'm quite sure that the C# compiler is written in C++ (it's unmanaged code, however). In particular, if you go to the folder that contains the csc.exe executable, you will find that the main part of the compiler is in the
unmanaged DLL cscomp.dll. In the same folder you will find a managed wrapper for cscomp.dll, which is called cscompmgd.dll, that contains some types of the Microsoft.CSharp namespace.

However, it's true that some compilers are written in the same language they compile. Apart from the C/C++ compilers (quite obviously) the Garden Point Component Pascal compiler (by John Gough), for example, is written in
Component Pascal.

Have a nice day
GV

"Ayende Rahien" <Ay****@no.spam> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:Ob****************@TK2MSFTNGP10.phx.gbl.. .

I spoke with Anders Hjelsberg one time and he said with somewhat of a


wry
smile that the C# compiler was actually written in C#.

ISTR a story I've heard once about the Pascal compiler (the first one)


which
was written on paper, and then the author run the compiler through the
compiler (in its head) to compile.


Nov 15 '05 #12
"Leon Lambert" <la******@inil.com> wrote in message
news:um**************@TK2MSFTNGP10.phx.gbl...
The C# compiler for the Mono project is written in C# so why couldn't
Microsoft's be written in C#. The .Net frameworks class
System.Reflection.Emit handles most of the issues for creating the IL code.

Well, I haven't said "it's not possible to create a C# compiler in C#". I
knew that the mono C# compiler is written in C#.
I only pointed out that at the moment the C# compiler from Microsoft is
written in C++.

Have a nice day
GV


Gianluca Varenni wrote:
Hi.

I'm quite sure that the C# compiler is written in C++ (it's unmanaged code, however). In particular, if you go to the folder that contains the csc.exe executable, you will find that the main part of the compiler is in the
unmanaged DLL cscomp.dll. In the same folder you will find a managed wrapper for cscomp.dll, which is called cscompmgd.dll, that contains some types of the Microsoft.CSharp namespace.

However, it's true that some compilers are written in the same language they compile. Apart from the C/C++ compilers (quite obviously) the Garden Point Component Pascal compiler (by John Gough), for example, is written in
Component Pascal.

Have a nice day
GV

"Ayende Rahien" <Ay****@no.spam> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:Ob****************@TK2MSFTNGP10.phx.gbl.. .

I spoke with Anders Hjelsberg one time and he said with somewhat of a


wry
smile that the C# compiler was actually written in C#.

ISTR a story I've heard once about the Pascal compiler (the first one)


which
was written on paper, and then the author run the compiler through the
compiler (in its head) to compile.


Nov 15 '05 #13
Maybe an in-house tool they used early on.

--
William Stacey, MVP

"Daisy" <da***@nospam.oops> wrote in message
news:br**********@linux01.dannytuppeny.com...
"William Stacey" <st***********@mvps.org> wrote in message
news:eJ**************@TK2MSFTNGP11.phx.gbl...
Is the cs compiler written in C#?
Don't know for sure, but some have suggested it is. Cheers!


If it was, how did they compile it? 0:-)
--
Daisy The Cow

Nov 15 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: NewmanBT | last post by:
I need some help with the following code It should be changing the report whenever the row array is changed, but it isn't. I've done some editing to remove parts of the code that I don't think...
1
by: Praveen | last post by:
Hi All, I have a server DB2 UDB V8 on sun box. and accessing the server using DB2 UDB client 7 from win2k system. Till now i used to login using db2inst1 user which a default user created by...
1
by: Karl Seguin | last post by:
i have a dynamically created user control which contains a non-dynamically created ASP.Net button. When the button is clicked, the event is not fired. I know that the control must be created on...
0
by: AJP | last post by:
I have a child window which does the following after a button is pressed: Response.Write("<script>window.opener.__doPostBack('','');</script>"); but I get the following uncaught exception upon...
2
by: Suma | last post by:
I have a problem with editable datagrid and was hoping if anyone could help me. Please help me if possible. I have an editable datagrid, whose column count I don’t know until runtime. I am...
4
by: Crirus | last post by:
I have a function that take a graphics and draw something using that graphics Anyway, I can use diferent Graphics that are not located in the same position on the screen coordinate, so I need to...
12
by: nat | last post by:
Hi all, I was going to post this in the AJAX forum, but apparently someone posted an AJAX/C# question in there today and was told to try this forum instead. So here goes: I'm trying to figure...
6
by: raoul | last post by:
MSIE 6.0 apparently does not support protyping with objects created with document.createElement, while Firefox does. I tested it by typing it into the adress bar, but it also appears to be the...
1
by: enthusiastic | last post by:
Hi All I have a HTML page where I dynamically created 2 Iframes. The problem is, after this page is loaded & I navigate to some other page & come back using browsers back button, both of the...
4
by: Siv | last post by:
Hi, I have an application that reads information from a database and depending on that information creates controls on a form. Depending on where the user is at in a process there may be one item...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.