From: KONTRA Gergely Date: 2003-05-13T22:54:09+09:00 Subject: Re: Ruby OO? sin method? puts method? @@? On 0513, nobu.nokada@softhome.net wrote: > > Than why not sin is a method? > To fit to mathematical notation. ??? 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... > > And puts? > puts is a method of IO class. > STDERR.puts "asdf" > Or you can use Kernel#display. > "asdf".display(STDERR) Again confusing for me... 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? Or has ruby a habit in the core and not a concept? Another ugliness in the syntax, which bothers me is the @ and @@ (and will be @@@ ??) notation, which I think doesn't fit into the view. Does anybody know the root of it? In one side ruby tries to avoid the rude $ variables, but on the other hand has @ and @@ variables (members)... Gergo -- +-[ Kontra, Gergely PhD student Room IB113 ]---------+ | http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy | | Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" | +-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+