LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Does Python 2.4 compile? (https://www.linuxquestions.org/questions/programming-9/does-python-2-4-compile-533557/)

billiejoex 03-02-2007 04:46 AM

Sure, but that's what user kalabanta was asking for.

phantom_cyph 03-02-2007 05:42 AM

So are C and C++ the only programming languages that actually have their own form of a compiler?

taylor_venable 03-02-2007 07:30 AM

Compilers
 
Quote:

Originally Posted by kalabanta
So are C and C++ the only programming languages that actually have their own form of a compiler?

No -- many languages compile to native code, and it's possible to write such a compiler for any programming language. For example, the following languages all compile to native code on some platform or another: Ada, C, C++, Erlang, Haskell, Java, OCaml, Standard ML. All a compiler does is translate the syntax and semantics of a language into the raw CPU instructions needed to execute programs written in that language, nothing more.

Typically, the more dynamic a language is (e.g. Perl, Python, Ruby, Scheme) the less likely it is to have a direct-to-native code compiler. Usually the course taken in such a case is to convert the program in the dynamic language into an equivalent C program, which is then compiled to native code.

And BTW, as far as learning Ruby goes, try Googling. Or even better, buy the Pickaxe book.


All times are GMT -5. The time now is 05:21 PM.