>> Will there be automatic calling of the deserialization method
>> for objects, so that code like this DWIMs...
>> my Date $bday = 'June 25, 2002';
> Err... what do you mean it to do?
Wow, this is nice. He means (I think) that this will be translated into
my Date $bday = Date->new('June 25, 2002');
As far as I've understood during my hours of lurking, it has been decided that this
will not happen, but now is also the first time I am even slightly convinced that it
is a good idea.
I think it is really pretty, although it could be argued that:
a) As typing the translated code yourself would be easy, the whole idea would be a
useless complication.
or
b) The translation should only happen if the class defined the method
NEW_FROM_STRING() or some such, and that method would be used instead of new(). I
might be afraid that would also tend to bloat the class system, but I think there must
be a way.
Maybe a class could define the method new_from($obj) which would be called if it
existed, and whose return value would be what was assigned to the class-hinted
variable.
Is this going to be still-born?
david
--
(unbalanced brackets are really annoying