Ruby like syntactic sugar

Wayne Folta wfolta at netmail.to
Wed Mar 3 00:57:32 CET 2004


It seems your solution could be the basis for rubyesque Python. (Do you 
have it backwards regarding Ruby, though? Isn't 5.times the way a loop 
is done and the for-loop-looking construct is the syntactic sugar?)

But on a personal note, I'd add that the

> 5.times { print "Hello World!" }

syntax is the idiom that persuaded me Ruby is not for me. In my 
opinion, this construct is either too clever by half or it's too 
Smalltalkish (everything must be classed). It makes some sense when 
spoken, but I fail to see how a looping method belongs to the class of 
numbers, so it troubles me too much to use or to enjoy a language where 
this is natural.





More information about the Python-list mailing list