From: Eric Hodel Date: 2012-03-30T03:21:17+09:00 Subject: Re: Why z = Complex(1,2) rather than z = Complex.new(1,2)? On Mar 29, 2012, at 8:31 AM, Ori Ben-Dor wrote: > But doesn't it break the convention? I've never heard that there was a convention to avoid capitalizing method names, and I've been doing this a long time. It just so happened that almost nobody bothered to. Now, the convention is to provide a type conversion method that matches your class name for convenience. > I mean, the convention is using a constructor, so what's special about Complex that justifies breaking it? We decided to do something different because it was useful and looks nice. > If the saving four characters argument is valid for Complex, why isn't valid for all classes in general? Looking at `ri Kernel` I see the following type-conversion methods: Array BigDecimal Complex Float Integer JSON Pathname Rational String URI So, if you have your own class, there's a precedent for adding your own type conversion method to Kernel.