On Fri, 30 Aug 2002, William Pietri wrote:
> >> So creating a (static) method LogLine.create or something like that is
> >> probably the way to go.
> > 
> > This is better than overiding new because programmers expect
> > SomeClass.new.class == SomeClass
> 
> Should programmers really depend on that?
[...]
>  But 
> since Ruby is so much more flexible, I'm trying to see how far I can bend 
> it. :-)

You know that you can "bend" ruby that far.  I'm more concerned with the 
programmers having to read that sort of code.  When I read 
"SomeClass.new", I think "constructor".  When the code says 
"SomeClass.create" I think "factory".  There is no problem for the 
interpreter.  Just with the people (erroneously) thinking "just why do we 
call SomeClass'es constructor here?  I thought we would need an instance 
of SomeSubclass".  Its about readability, not functionality.

  Tobias