On Sun, 12 Dec 2004 05:45:37 +0900, Carlos <angus / quovadis.com.ar> wrote:
> [zuzu <sean.zuzu / gmail.com>, 2004-12-11 21.13 CET]
> 
> 
> > but a programmer cannot
> >
> >    "this is a string".puts
> >
> > and produce the desired result.  instead the programmer must
> >
> >    puts "this is a string"
> >
> > switching from postfix to prefix notation, most likely intuitive
> > because of experience C-style printf() or C++ style cout (or i suppose
> > BASIC).
> >
> >
> >
> > however, i suppose the real answer should be "shut up and code it that
> > way for yourself then".  but i want to throw this out there for
> > discussion as to why this was implemented in this way to begin with,
> > as well as gather information from those who know offhand where the
> > source of this lies in the default object library.
> 
> You have Object#display. But nobody uses it...

thank you as well, with an even more complete answer.
(maybe someday ri will work by default on osx/darwin.)

from a language design perspective, or perhaps this is a ruby idomatic
/ programmer organization behavior perspective, any clues as to why
nobody uses it?

is it just obscure?  not well documented in english (or at all)?  just
not the way most programmers think due to their path-dependency (i.e.
first language learned, and all that...)?

peace,
-z

> $ ri -T display
> --------------------------------------------------------- Object#display
>      obj.display(port=$>)    => nil
> ------------------------------------------------------------------------
>      Prints _obj_ on the given port (default +$>+). Equivalent to:
> 
>         def display(port=$>)
>           port.write self
>         end
> 
>      For example:
> 
>         1.display
>         "cat".display
>         [ 4, 5, 6 ].display
>         puts
> 
>      _produces:_
> 
>         1cat456
> 
>