From: zuzu Date: 2004-12-12T05:13:14+09:00 Subject: puts / print as method not keyword? so, i'm thinking about language design with a particular interest in concatinative combinators (postfix notation). you may remember my questions and wonderful help jim weirich and others gave me some time ago on the list w/r/t developing a pipes & filters syntax in ruby. i started to worry that perhaps i was going to distort ruby out of shape, when the case study i was running in my head seemed to be the anomaly. most of my "this is weird" thoughts seem to stem from the design of the Kernel object and subsequently how it is mixed in to the Object object. (the Kernel object representing the ruby interpreter / virtual machine itself; though the Object object representing the rationally pure originator of all other objects supposedly including the Kernel.) so here's what i was thinking... quite alot of ruby idioms make use of object methods to express themselves in a "data.manipulate" or "data.express" format; that is, something like: 3.times in a chain of 3.times {puts "thingy!"} . (perhaps others can contribute other examples, or just look them up in the pickaxe -- thanks dave & andy.) 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" 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. thanks, -z