How does Ruby compare to Python?? How good is DESIGN of Rubycompared to Python?

Greg Ewing (using news.cis.dfn.de) wmwd2zz02 at sneakemail.com
Mon Mar 1 19:45:01 EST 2004


Joe Mason wrote:
> I didn't think Pascals and Basics supported function pointers at all,
> but I haven't used them since high school, so maybe I just didn't
> encounter them at the time.

Some Basics would let you use the result of an expression as a
line number in a GOTO or GOSUB, just in case there weren't already
enough ways to turn your code into spaghetti. Those that didn't
usually had ON...GOTO and ON...GOSUB statements that could be used
to achieve much the same effect.

Pascal lets you pass a procedure as a parameter to another
procedure (but not store it in a variable, due to scope issues).
It's likely this wouldn't have been mentioned in an introductory
Pascal course, however, as it would have been considered a
somewhat esoteric feature.

Later Wirth languages (Modula, Oberon) do let you have procedure
variables. But they can only point to top-level procedures, not
nested ones. One step forward, one back...

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list