Popular conceit about learning programming languages

Pascal Costanza costanza at web.de
Sun Nov 24 20:25:15 EST 2002


Alex Martelli wrote:
> Pascal Costanza wrote:
>    ...
> 
>>>>I mean, Python is already more advanced than Java.
>>>
>>>Oh, I agree with this, but that's not the point.
>>
>>Er, I have thought that's exactly the point. What do you need a
>>backstage language for that is less powerful than the frontstage
>>language?
> 
> 
> The first Lisp interpreter was coded in machine language.  The first Python 
> interpreter was coded in C.  Examples could easily be multiplied.  The 
> lower-level, faster language is often used as the "backstage" (not a term
> I'm familiar with, but I think I'm interpreting your meaning correctly).  I 
> think (not sure) that the first Prolog interpreter was coded in Lisp, 
> presumably with similar intentions.  So, I'm not quite sure what your 
> question is meant as -- rhetorical, perhaps?

No, my question is not meant as a rhetorical one. I am a little bit 
confused because I believe I have made it clear what I am talking about 
- obviously not. Hm.

Languages like C and assembler are more powerful than, say, Python 
because they allow you to circumvent type restrictions and fiddle with 
the operating system level.

Common Lisp is more powerful than Python because it has the code=data 
feature that allows you to create new language features and some 
sophisticated and efficient algorithms.

Languages like Python, Ruby, Lua and so on make use of C as a 
"backstage" language in order to expand their possibilities. I believe 
that they could also benefit from Common Lisp as a backstage language.

So my mental model is as follows: Scripting languages allow you to 
solve, say, 90% of the problems in straightforward and simple ways. 
However, some problems are complicated or demanding enough that you (or 
"someone";) needs to revert to the more powerful backstage language.

I don't see how Java can play this role for Python because Java neither 
allows you to fiddle with the machine level nor allows for writing 
complicated algorithms, at least not when compared to Python.

Or is there something I miss?

>>(I guess that Jython is useful to take advantage of the Java
>>APIs and its platform independence.)
> 
> 
> That's a typical reason to choose Jython rather than CPython, yes -- being 
> able to take advantage of existing Java-coded libraries (including the APIs 
> of the various Java-based standards), and/or of platforms able to run Java 
> bytecode (including various JVMs).

Are there other reasons?


Pascal

-- 
Given any rule, however ‘fundamental’ or ‘necessary’ for science, there 
are always circumstances when it is advisable not only to ignore the 
rule, but to adopt its opposite. - Paul Feyerabend




More information about the Python-list mailing list