From: Alexander Kellett Date: 2005-02-17T01:02:25+09:00 Subject: Re: Printing why's (poignant) guide to ruby On Feb 16, 2005, at 4:56 PM, Gavri Fernandez wrote: > On Wed, 16 Feb 2005 02:13:50 +0900, Mark Hubbart > wrote: > >> No, you don't go paradigm-swapping on them. When it gets to a point >> where it makes a difference, let them know that "puts" is the short >> form of "STDOUT.puts". Tell them that STDOUT is an object that is >> created for you, which can recieve messages that, among other things, >> help you write to the screen. Have them write a little code using >> STDOUT. Then tell them that the short form is easier, and more >> commonly used. > > But why is this better than just starting with > STDOUT.puts > and later after object-oriented concepts have been completely > understood introduce > puts > > why do you want to go this way? > puts -> STDOUT.puts -> puts > > I really think doing it with hard-core object-orientation in the > beginning will help a lot. It's so natural. personally i'd teach via p this is not only the inspection output of a return value for irb, but its also a heck of a lot less confusing in some corner cases. i doubt that any user will be impressed by having to type STDOUT.puts whenever they want to see something :) Alex