On Sun, Jul 8, 2012 at 11:39 AM, smoothedatol412 @gmail.com <[email protected]> wrote: > I did not know that people were still commenting this topic.. > Anyways, I do not like the short hand version of using this type of > statement in ruby when I tried to use it in test scripts. > > # short example > var=10 > p var > > I have choose to use the following statement instead > > var=10 > puts var.inspect() > > I have come from Java and a few other programming backgrounds and I am > use to the compiled langs, like C and Java. I like coding things > out the long way since it is easy to go back later on and easily find > that bug code that is creating problems for the program.
While I generally sympathize with that approach (making things explicit) I don't agree in this particular case. You'll find "p var" as easily as "puts var.inspect" - but it's far less typing. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
