Ori Ben-Dor wrote in post #1053971:
> But doesn't it break the convention? I mean, the convention is using a
> constructor,

No, there is no such convention.  Using class.new is the basic way to 
create an instance but nothing forbids having methods which return new 
instances.  In fact, it happens all the time.  The only thing that is 
unusual here is that the method "coincidentally" has the same name as 
the class of the instances it returns.

> so what's special about Complex that justifies breaking it?
> If the saving four characters argument is valid for Complex, why isn't
> valid for all classes in general?

Because Complex is a numeric type and it can be called "basic" with 
enough justification, I guess.

Cheers

robert

-- 
Posted via http://www.ruby-forum.com/.