List Info

Thread: Re: Object Identification Cold War and the return of autobox.pm (was Re: UNIVERSAL::ref might make r




Re: Object Identification Cold War and the return of autobox.pm (was Re: UNIVERSAL::ref might make r
user name
2007-02-27 06:38:49
On 26/02/07, chromatic <chromaticwgz.org> wrote:
> > Please reconsider autobox.
>
> I second this request.

autobox in on CPAN and works. Moreover, the intent of the
work on
lexical pragmas was to enable people to write their own
pragmas and
put them on CPAN. (*) So just use it.

Or, maybe you were asking to make autobox the default ? No.
That's not
going to happen anytime soon. The implications for
backwards
compatibility are too huge. And moreover the feature list
for 5.10 is
frozen (almost), because at some point we have to release.

If autobox gets popular, used, stable, it might be included
in perl
5.12 core. For the moment I think that's premature and I'd
rather have
people adding it as a prerequisite of their modules. (Note
that I hope
that 5.12 will happen in a much shorter range of time than
we had to
wait between 5.8.0 and today for 5.10.)

(*) I note that autobox does some unclean hacks with $^H and
%^H in
order to try to be lexical. That would cause problems in
evals. I
think it will have to be rewritten for  recent perls, to use
the new
lexical pragma capability.

Re: Object Identification Cold War and the return of autobox.pm (was Re: UNIVERSAL::ref might make r
user name
2007-02-27 16:10:00
Rafael Garcia-Suarez wrote:
> On 26/02/07, chromatic <chromaticwgz.org> wrote:
>> > Please reconsider autobox.
>>
>> I second this request.
> 
> autobox in on CPAN and works. Moreover, the intent of
the work on
> lexical pragmas was to enable people to write their own
pragmas and
> put them on CPAN. (*) So just use it.

Normally I would agree, I'm firmly in the "the only
modules which should
ship with the core are those which help installing more
modules" camp.  But
this seems a bit of fundamental language stuff that happens
to be available
as a module.


> Or, maybe you were asking to make autobox the default ?
No. That's not
> going to happen anytime soon. The implications for
backwards
> compatibility are too huge.

Well, yes I was.   The last
time it was discussed I don't recall much
consideration given to backwards compatibility.  Mostly it
was that folks
didn't see much utility.

So what are the backwards compatibility implications?

One off the top of my head is code like this...

    sub is_object {
        my($thing) = shift;
        return eval { $thing->isa("UNIVERSAL")
};
    }

But I wonder how many people do something like that, what
its used for and
if anything would really break if everything were an
object.


> And moreover the feature list for 5.10 is
> frozen (almost), because at some point we have to
release.

Sorry, I didn't mean to imply squeezing it into 5.10. 
Whether it makes it
into 5.10 or 5.12 or 5.14 is a whole other issue.  Right now
I just want to
crack the discussion back open.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )