From: Mark Hubbart Date: 2005-02-16T02:13:50+09:00 Subject: Re: Printing why's (poignant) guide to ruby Hi, On Tue, 15 Feb 2005 01:04:22 +0900, Gavri Fernandez wrote: > For someone who is new to programming > "string".display > wouldn't feel less natural than > print "string" > > Really, think about that. > > And why should we try to teach them the procedural paradigm and then > say 'Hey! forget all that stuff you learnt. It's not really a good way > to program. Now i'll teach you the object-oriented way" ? 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. > Of course, all of this I say assuming that the goal is to create an > object-oriented programmer, not a procedural one. I suspect the goal is to create a Ruby programmer :) Which means that there will be some amount of overlapping. cheers, Mark