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 | | | | re: With what language was C# created
"Sam Sungshik Kong" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?[/color]
Probably C++, and then C#. | | | | re: With what language was C# created
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" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?
>
> I am just curious.
>
> Sam
>
>[/color] | | | | re: With what language was C# created
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" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?
>
> I am just curious.
>
> Sam
>
>[/color] | | | | re: With what language was C# created
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:ObR%23KNWwDHA.1888@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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#.[/color]
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. | | | | re: With what language was C# created
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" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?
>
> I am just curious.
>
> Sam
>
>[/color] | | | | re: With what language was C# created
"William Stacey" <staceywREMOVE@mvps.org> wrote in message
news:eJchDOawDHA.3140@TK2MSFTNGP11.phx.gbl...[color=blue]
> Is the cs compiler written in C#?
> Don't know for sure, but some have suggested it is. Cheers![/color]
If it was, how did they compile it? 0:-)
--
Daisy The Cow | | | | re: With what language was C# created
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" <Ayende@no.spam> wrote in message
news:%23XaF%23EXwDHA.1788@tk2msftngp13.phx.gbl...[color=blue]
>
> "Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
> news:ObR%23KNWwDHA.1888@TK2MSFTNGP10.phx.gbl...[color=green]
> > I spoke with Anders Hjelsberg one time and he said with somewhat of a[/color][/color]
wry[color=blue][color=green]
> > smile that the C# compiler was actually written in C#.[/color]
>
> ISTR a story I've heard once about the Pascal compiler (the first one)[/color]
which[color=blue]
> was written on paper, and then the author run the compiler through the
> compiler (in its head) to compile.
>
>[/color] | | | | re: With what language was C# created
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" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?
>
> I am just curious.
>
> Sam
>
>[/color] | | | | re: With what language was C# created
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" <ssk@chol.net> wrote in message
news:eURxmCRwDHA.1196@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi!
>
> This might be a stupid question.
> With what language was C# compiler created?
> I guess assembly.
> Or C?
>
> I am just curious.
>
> Sam
>
>[/color] | | | | re: With what language was C# created
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:[color=blue]
> 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" <Ayende@no.spam> wrote in message
> news:%23XaF%23EXwDHA.1788@tk2msftngp13.phx.gbl...
>[color=green]
>>"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
>>news:ObR%23KNWwDHA.1888@TK2MSFTNGP10.phx.gbl.. .
>>[color=darkred]
>>>I spoke with Anders Hjelsberg one time and he said with somewhat of a[/color][/color]
>
> wry
>[color=green][color=darkred]
>>>smile that the C# compiler was actually written in C#.[/color]
>>
>>ISTR a story I've heard once about the Pascal compiler (the first one)[/color]
>
> which
>[color=green]
>>was written on paper, and then the author run the compiler through the
>>compiler (in its head) to compile.
>>
>>[/color]
>
>
>[/color] | | | | re: With what language was C# created
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" <lambertl@inil.com> wrote in message
news:umbKOHxwDHA.2328@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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[/color]
code.[color=blue]
>
> Gianluca Varenni wrote:[color=green]
> > Hi.
> >
> > I'm quite sure that the C# compiler is written in C++ (it's unmanaged[/color][/color]
code,[color=blue][color=green]
> > however). In particular, if you go to the folder that contains the[/color][/color]
csc.exe[color=blue][color=green]
> > 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[/color][/color]
wrapper[color=blue][color=green]
> > for cscomp.dll, which is called cscompmgd.dll, that contains some types[/color][/color]
of[color=blue][color=green]
> > the Microsoft.CSharp namespace.
> >
> > However, it's true that some compilers are written in the same language[/color][/color]
they[color=blue][color=green]
> > compile. Apart from the C/C++ compilers (quite obviously) the Garden[/color][/color]
Point[color=blue][color=green]
> > Component Pascal compiler (by John Gough), for example, is written in
> > Component Pascal.
> >
> > Have a nice day
> > GV
> >
> > "Ayende Rahien" <Ayende@no.spam> wrote in message
> > news:%23XaF%23EXwDHA.1788@tk2msftngp13.phx.gbl...
> >[color=darkred]
> >>"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
> >>news:ObR%23KNWwDHA.1888@TK2MSFTNGP10.phx.gbl.. .
> >>
> >>>I spoke with Anders Hjelsberg one time and he said with somewhat of a[/color]
> >
> > wry
> >[color=darkred]
> >>>smile that the C# compiler was actually written in C#.
> >>
> >>ISTR a story I've heard once about the Pascal compiler (the first one)[/color]
> >
> > which
> >[color=darkred]
> >>was written on paper, and then the author run the compiler through the
> >>compiler (in its head) to compile.
> >>
> >>[/color]
> >
> >
> >[/color]
>[/color] | | | | re: With what language was C# created
"Leon Lambert" <lambertl@inil.com> wrote in message
news:umbKOHxwDHA.2328@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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[/color]
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
[color=blue]
>
> Gianluca Varenni wrote:[color=green]
> > Hi.
> >
> > I'm quite sure that the C# compiler is written in C++ (it's unmanaged[/color][/color]
code,[color=blue][color=green]
> > however). In particular, if you go to the folder that contains the[/color][/color]
csc.exe[color=blue][color=green]
> > 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[/color][/color]
wrapper[color=blue][color=green]
> > for cscomp.dll, which is called cscompmgd.dll, that contains some types[/color][/color]
of[color=blue][color=green]
> > the Microsoft.CSharp namespace.
> >
> > However, it's true that some compilers are written in the same language[/color][/color]
they[color=blue][color=green]
> > compile. Apart from the C/C++ compilers (quite obviously) the Garden[/color][/color]
Point[color=blue][color=green]
> > Component Pascal compiler (by John Gough), for example, is written in
> > Component Pascal.
> >
> > Have a nice day
> > GV
> >
> > "Ayende Rahien" <Ayende@no.spam> wrote in message
> > news:%23XaF%23EXwDHA.1788@tk2msftngp13.phx.gbl...
> >[color=darkred]
> >>"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
> >>news:ObR%23KNWwDHA.1888@TK2MSFTNGP10.phx.gbl.. .
> >>
> >>>I spoke with Anders Hjelsberg one time and he said with somewhat of a[/color]
> >
> > wry
> >[color=darkred]
> >>>smile that the C# compiler was actually written in C#.
> >>
> >>ISTR a story I've heard once about the Pascal compiler (the first one)[/color]
> >
> > which
> >[color=darkred]
> >>was written on paper, and then the author run the compiler through the
> >>compiler (in its head) to compile.
> >>
> >>[/color]
> >
> >
> >[/color]
>[/color] | | | | re: With what language was C# created
Maybe an in-house tool they used early on.
--
William Stacey, MVP
"Daisy" <daisy@nospam.oops> wrote in message
news:brfkuo$s0i$1@linux01.dannytuppeny.com...[color=blue]
> "William Stacey" <staceywREMOVE@mvps.org> wrote in message
> news:eJchDOawDHA.3140@TK2MSFTNGP11.phx.gbl...[color=green]
> > Is the cs compiler written in C#?
> > Don't know for sure, but some have suggested it is. Cheers![/color]
>
> If it was, how did they compile it? 0:-)
> --
> Daisy The Cow
>
>[/color] |  | Similar C# / C Sharp bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,223 network members.
|