Ruby like syntactic sugar

Wayne Folta wfolta at netmail.to
Tue Mar 2 18:57:32 EST 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