james_b
2/4/2006 2:39:00 AM
Clint Checketts wrote:
> While programming with Ruby, I've grown to love just how clear and concise
> the language is. (You all already know this of course).
>
> So, why is the object constructor so long? I mean 'initialize' could easily
> be replaced with 'init' or even just plain 'new'.
>
> In support of this idea, I've noticed that to_string() is written to_s. The
> same is with arrays, integers, and floats.
>
I suspect people call to_* more often than they call initialize.
But, poor speller that I am, one of the first gvim macros I wrote to
assist my Ruby hacking was a mapping that turned
defi
into
def initialize( )
end
So it became a non-issue for me.
(The other day I shoulder-surfed as someone coded Ruby using Notepad,
and it was so painful to watch even my hair hurt.)
--
James Britt
"Blanket statements are over-rated"