On 2006-07-08, Sean O'Halpin <sean.ohalpin / gmail.com> wrote:

> On 7/8/06, Jeremy Henty <jeremy / chaos.org.uk> wrote:
>> On 2006-07-08, Sean O'Halpin <sean.ohalpin / gmail.com> wrote:
>>
>> > ... I do think it would be nice if Klass() were a synonym for
>> > Klass.new(). As far as I know, this wouldn't conflict with anything
>> > in the Ruby standard lib ...
>>
>> Yes it would:
>>
> You left out the qualification I made - "(apart from Array(),
> String() and maybe some others which I forget)". It might have been
> more gentlemanly to expand on the "maybe some others" than to make
> me appear to have made an incorrect assertion by selectively quoting
> from what I said.

Sorry about that.  I was just trying to be concise.  The point I was
making (which Daniel DeLorme also makes elsewhere in the thread) is
that the convention already exists that Klass(x) means "coerce x to an
instance of Klass", rather than "call Klass.new()".  As least it does
for many values of Klass, so to make all instances of Klass() synonyms
for Klass.new() would be seriously incompatible.  I'm sure there's no
chance of it happening in Ruby 1 .  I don't know if anyone's suggested
making Ruby 2 more consistent about this.

Regards, 

Jeremy Henty