Troll?

Jul 21, 2008 10:43

Please let this be a troll? http://groups.google.com/group/comp.lang.python/browse_thread/thread/355439b8fca5b1f6?hl=en

Sample:
So I was suspecting the Python compiler or interpreter is written in a ( Read more... )

python, wtf, programming

Leave a comment

Comments 4

richterca July 21 2008, 22:21:52 UTC
Wait, I'm confused.

The Python complier is written in C? Ok. Odd, but ok. You'd think they'd write it in machine language, or something, like the C compiler is written in, but whatever.

But what bearing does that have on anything? You can still write Python code without knowing C, correct? Why should this even matter?

Reply

hyuga July 21 2008, 23:30:33 UTC
Why would it be written in machine language? For that matter, why would the C compiler be written in machine language either? gcc is written in C....

Also, CPython is just the reference implementation. There's as PyPy (written in Python), Jython (Java), and IronPython (C#).

Reply

loopers July 22 2008, 00:50:14 UTC
I've never even heard of a compiler written in machine language. I doubt any serious compiler has been in decades, actually. I think the vast majority of compilers are written in C/C++. There's also a long tradition of writing a compiler in the same language it compiles to (Mono's C# compiler is written in C#, for example).

Machine language is probably the least suitable language for writing a compiler, actually, simply because the complexity of the task implies high-level functionality. In fact, the front-end of a compiler is often not even written in a general-purpose programming language, but automatically generated by lexer and parser generators (lex/yacc).

I took a compilers class a little over a year ago, and we wrote a compiler in SML using ml-lex and ml-yacc. That was an adventure.

I don't think this post is a troll, though. I think it's just an incredibly clueless person.

Reply


spate July 23 2008, 03:11:22 UTC
I'm a little appalled that people don't have more respect for good 'ol C.

Reply


Leave a comment

Up