Hi,
In message "Re: Ruby OO? sin method? puts method? @@?"
on 03/05/13, KONTRA Gergely <kgergely / mlabdial.hit.bme.hu> writes:
|I write sin(0.5) but also abs(0.5)
|So I don't know why the difference, and why cannot a number tell it's
|sin. This is analogous to "asdf".length and the others...
The sin function in your math textbook was described
sin(x)
right? So I chose sin(x). I honor tradition. In my textbook,
absolute value notation was
|x|
not a functional form, so I had no reason to choose functional style.
|Which approach uses ruby?
|IO.puts(what) or what.puts(IO=stdout) and why it is not consistent.
|The string displays itself, or the filehandle displays the string?
You put text to the console line, or you display text on the console;
both does make sense, doesn't it? Ruby users seem to prefer "puts"
though.
matz.