Does Python compete with Java?

Jakub Fast kfast at poczta.onet.pl
Tue Apr 13 18:59:59 EDT 2004


> No, it isn't. People would not like it because it looks like line noise.

I guess that qualifies as a definite answer. Shame, though, in my 
stubborn and incorrigible ways i still kind of think a well-constructed 
operator saves the day, especially when exposing your language in a 
"custom" environment, such as embedded scripting or a neatly defined 
collection of 'special' tasks. Of course you can always resort to 
getting the user to provide text files that you parse yourself according 
to some custom grammar (which is what i'll probably end up doing), but 
that has disadvantages in regards to a nice side effect of getting 
people to pick up some python on the way and actually feel like they're 
really programming.

and yes, i do think this is enough of a reason to look at other 
languages that do permit op overloading for you embedded scripting in 
some cases (like when you don't want to confuse the average user too 
much and make typical tasks as easy as possible while retaining the 
versatility of a full-fledged language).

of course custom operators (if they permit alphanumeric shapes for 
instance...) can make one major mess of your code, but then, isn't the 
zen of python more along the way of: "the master hits the student 
repeatedly with a stick and the student experiences enlightenment" 
rather than "the master takes the toys away from the student". Is just 
the inclusion of a feature like this into the language considered evil, 
especially taking into account that it does not intervene with whatever 
else there is in the language?

 >> S ==> (NP and VP) or VP
 >
> If it is the structure, you should be able to write this as
> 
>   S.implies(NP.and_(VP).or_(VP))
> 

This is completely fine and actually quite cool if you've had your OO 
practice, but the point is that the parts you actually felt missing and 
which made my formulation unreadable to you are absolutely obvious for 
anyone who has had anything to do with linguistics -- which definitely 
would be the case with whomever i'd show the module to :) -- and the 
sample form i give would require 0.5 degrees of learning effort, as 
opposed to 10.5 degrees or way more if you're completely new to programming.


Is there really no chance this goes into python on an "if you really 
have to do this, be warned, but here are the tools" basis?

Anyway, hope i'm not boring you to death and thank you for your answers

Kuba




More information about the Python-list mailing list