From: Yukihiro Matsumoto Date: 2004-12-12T06:18:50+09:00 Subject: Re: puts / print as method not keyword? In message "Re: puts / print as method not keyword?" on Sun, 12 Dec 2004 05:38:33 +0900, zuzu writes: |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". It is very interesting to see how POLS differ person to person. That's one of the reasons I discourage use of the word POLS in any proposal. ;-) "puts" was taken from UNIX C output function, which takes an output string as an argument, so that it is more natural (for me at least) to take functional form. I would be astonished very much when puts takes output destination as an argument. "display" was inherited from Smalltalk. |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. I don't see any obvious reasons behind your opinion. Can you elaborate? matz.