From: Josef 'Jupp' Schugt Date: 2004-09-17T20:56:15+09:00 Subject: Re: JRuby article Gavin Sinclair wrote: > It's a shame that they all use such unidiomatic Ruby, like > > print "Hello, world!\n" > > instead of > > puts "Hello, world!" > > and 'if not' instead of 'unless'. Oh well... at least it's going > to encourage me to try it out! IRTIAMTOWTDI - In Ruby there is also more than one way to do it. I think that there is good reason *not* to use 'puts' and 'unless' because: a) Using 'print' plus backslash escapes demonstrate more language capabilities than use of 'puts'. Same holds for 'if not' in place of 'unless'. b) The most widely used scripting language is Perl. The 'print' example shows that one need not change output statements when porting from Perl to Ruby. Concerning the 'if not': I am pretty sure that every (former?) Perl programmer will try out if 'unless' can be used as well. c) If you use more than one programming languages it is a matter of memory efficency *not* to keep in mind those language constructs that are special to a certain language but those that are common to several of them - unless of course these constructs are the reason why you use that certain programming language for a certain purpose. Just my 0.02 EUR. Josef 'Jupp' Schugt