On Sun, 12 Dec 2004 05:23:10 +0900, Ilmari Heikkinen <kig / misfiring.net> wrote:
> 
> On 11.12.2004, at 22:13, zuzu wrote:
> 
> > but the Kernel's puts/print
> > fuction doesn't seem to carry over.  it works fine as a global
> > keyword, but a programmer cannot
> >
> >    "this is a string".puts
> >
> > and produce the desired result.  instead the programmer must
> >
> >    puts "this is a string"
> 
> As far as I know, it's a matter of
> 
> STDOUT.puts(string)
> 
> versus
> 
> string.puts(STDOUT)

yes, precisely!  :D

see, my concern then is that the "to where?" question becomes much
more obvious in the second, and much more necessary as ruby grows
beyond just a virtual machine running inside a unix environment or as
ruby grows as a networked language.   perhaps i don't just want the
default STDOUT but would like to specify tty3 versus tty9 or perhaps
window7 of some screen tty multiplexing session or how emacs manages
buffers, and so on...

oh, also, correct me if i'm wrong, but method/function argument
passing really should only be used for CONSTRAINTS _not_ DATA.

and so i also feel that

   string.puts(STDOUT)

or i'm probably thinking more like

   string.puts {STDOUT}

much more closely follows the so-called "Principle of Least Surprise".

> (and then there's Kernel#p, which is an anomaly)

due to its debugging intention, no?

peace,
-z

p.s. thanks for replying so quickly.