List Info

Thread: lexical aliases in 5.10?




lexical aliases in 5.10?
user name
2007-05-26 13:40:04
perl591delta lists this todo for 5.10:

  Allow lexical aliases (maybe via the syntax "my
$alias = $foo".

I seem to recall some discussion of this, but not any
specifics, and lazy
Googling wants me to think it was all in 2002.  It doesn't
seem to be
implemented.

Was this put off until a future version?

-- 
rjbs

Re: lexical aliases in 5.10?
user name
2007-05-26 20:29:18
Ricardo SIGNES skribis 2007-05-26 14:40 (-0400):
> perl591delta lists this todo for 5.10:
>   Allow lexical aliases (maybe via the syntax "my
$alias = $foo".
> I seem to recall some discussion of this, but not any
specifics, and lazy
> Googling wants me to think it was all in 2002.  It
doesn't seem to be
> implemented.
> Was this put off until a future version?

Aliasing is incredibly useful, not only in assignment (=),
but also in
many other places. Data::Alias supports aliasing semantics
(instead of
copying) in any operation imaginable (or at least almost).

I'd really love to see D::A (or similar functionality) in
core. A well
placed "alias" can be a big performance
improvement, and I think that's
good for Perl's reputation. Just like "memoize",
it is a nice little
thing that can quickly make things faster.

D::A is comprehensive, thoroughly tested, and well
maintained. If it
were in the standard distribution, perhaps some other core
modules could
use it internally, for better performance. Like Memoize,
perhaps.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <juerdjuerd.nl>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy
<salesconvolution.nl>

Re: lexical aliases in 5.10?
user name
2007-05-27 08:03:12
* Juerd Waalboer <juerdconvolution.nl>
[2007-05-26T21:29:18]
> Ricardo SIGNES skribis 2007-05-26 14:40 (-0400):
> > perl591delta lists this todo for 5.10:
> >   Allow lexical aliases (maybe via the syntax
"my $alias = $foo".
> 
> Aliasing is incredibly useful, not only in assignment
(=), but also in
> many other places. Data::Alias supports aliasing
semantics (instead of
> copying) in any operation imaginable (or at least
almost).

Yeah, when I saw this in perldelta and remembered the
discussion, I looked to
see if the syntax worked.  I saw that it didn't and figured
Data::Alias must
have become core.  It hadn't, hence my wondering.

-- 
rjbs

Re: lexical aliases in 5.10?
user name
2007-05-27 08:42:23
On 5/27/07, Ricardo SIGNES <rjbs-perl-p5plists.manxome.org> wrote:
> * Juerd Waalboer <juerdconvolution.nl>
[2007-05-26T21:29:18]
> > Ricardo SIGNES skribis 2007-05-26 14:40 (-0400):
> > > perl591delta lists this todo for 5.10:
> > >   Allow lexical aliases (maybe via the syntax
"my $alias = $foo".
> >
> > Aliasing is incredibly useful, not only in
assignment (=), but also in
> > many other places. Data::Alias supports aliasing
semantics (instead of
> > copying) in any operation imaginable (or at least
almost).
>
> Yeah, when I saw this in perldelta and remembered the
discussion, I looked to
> see if the syntax worked.  I saw that it didn't and
figured Data::Alias must
> have become core.  It hadn't, hence my wondering.

I think of all the packages that i know of that really aught
to be
core id say Padwalker and Data::Alias come right at the top
of the
list. Their implementations are so tightly tied to the core
that
having them be non core just means they break whenever the
core is
tweaked.

How many times have we seen BBC reports about Data::Alias in
just the
past little while?

I hope Andreas has Padwalker in his BBC testing. 

cheers,
yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Re: lexical aliases in 5.10?
user name
2007-05-27 11:08:48
demerphq skribis 2007-05-27 15:42 (+0200):
> How many times have we seen BBC reports about
Data::Alias in just the
> past little while?

Twice.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <juerdjuerd.nl>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy
<salesconvolution.nl>

Re: lexical aliases in 5.10?
user name
2007-05-28 03:28:16
On 27/05/07, demerphq <demerphqgmail.com> wrote:
> I think of all the packages that i know of that really
aught to be
> core id say Padwalker and Data::Alias come right at the
top of the
> list. Their implementations are so tightly tied to the
core that
> having them be non core just means they break whenever
the core is
> tweaked.

That's not really an argument for being in the core.
However, they
helped to find bugs in the core. Not really an argument
either. (or
else, Acme::Metasyntactic could be in the core 

I think (that's an impression) that Data::Alias is not
stable enough
to go in the core. Moreover, Data::Alias works with 5.8. I
think that
with some core tweaking, maybe using the new SVt_BIND type,
we could
have cleaner support for aliases. However I'd prefer to have
5.10 out
before.

Re: lexical aliases in 5.10?
user name
2007-05-28 04:06:50
On Mon, May 28, 2007 at 10:28:16AM +0200, Rafael
Garcia-Suarez wrote:

> with some core tweaking, maybe using the new SVt_BIND
type, we could
> have cleaner support for aliases. However I'd prefer to
have 5.10 out
> before.

The intent of SVt_BIND type was to provide the
infrastructure needed for
the 6-on-5 folks to get aliasing working. I don't know the
reasoning, but
as Data::Alias was already written when they started, I
infer that it isn't
able to provide something they need. The 6-on-5 folks seem
to be very quiet
currently.

If I got the stub SVt_BIND implementation correct, then it
will be possible
to provide the full functionality in 5.10.x without breaking
anything.

Nicholas Clark

Re: lexical aliases in 5.10?
user name
2007-05-28 04:55:59
>>>>> On Sun, 27 May 2007 15:42:23 +0200,
demerphq <demerphqgmail.com> said:

  > I hope Andreas has Padwalker in his BBC testing. 

Sure. Padwalker has been featured in the first private
showings of the
BBC, before the programme even had a name.

But thanks for mentioning it. My smokes are not designed for
running
the whole of CPAN, so I'm grateful for hints about modules
that
deserve being included.

Current full listing is at
https://pause.perl.org:5460/svn/cpanpm/trunk/megains
tall.txt and
distributed with CPAN.pm too.

-- 
andreas

Re: lexical aliases in 5.10?
user name
2007-05-28 05:03:17
On 5/28/07, Nicholas Clark <nickccl4.org> wrote:
> On Mon, May 28, 2007 at 10:28:16AM +0200, Rafael
Garcia-Suarez wrote:
>
> > with some core tweaking, maybe using the new
SVt_BIND type, we could
> > have cleaner support for aliases. However I'd
prefer to have 5.10 out
> > before.
>
> The intent of SVt_BIND type was to provide the
infrastructure needed for
> the 6-on-5 folks to get aliasing working. I don't know
the reasoning, but
> as Data::Alias was already written when they started, I
infer that it isn't
> able to provide something they need.

Or was it that they didn't want to rely on a non-core XS
module? (Hmm,
theres that catch-22 again... 

> The 6-on-5 folks seem to be very quiet currently.

It would be nice to hear their reason for not using
Data::Alias.

> If I got the stub SVt_BIND implementation correct, then
it will be possible
> to provide the full functionality in 5.10.x without
breaking anything.

Cool.

cheers,
Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Re: lexical aliases in 5.10?
user name
2007-05-28 05:01:08
On 5/28/07, Rafael Garcia-Suarez <rgarciasuarezgmail.com> wrote:
> On 27/05/07, demerphq <demerphqgmail.com> wrote:
> > I think of all the packages that i know of that
really aught to be
> > core id say Padwalker and Data::Alias come right
at the top of the
> > list. Their implementations are so tightly tied to
the core that
> > having them be non core just means they break
whenever the core is
> > tweaked.
>
> That's not really an argument for being in the core.

By itself no its not...

> However, they helped to find bugs in the core. Not
really an argument either. (or
> else, Acme::Metasyntactic could be in the core 

But I think its generally agreed to be useful, its clear its
sensitive
to core changes and as you say has helped find core bugs.
Any one
alone might not be a good argument but all together I think
they do
make a good argument. But im not the pumpking and you are.


> I think (that's an impression) that Data::Alias is not
stable enough
> to go in the core.

Afaict it seems unstable only because it is sensitive to
core changes.

If its a requirement that it be stable to go into core yet
its
unstable only because its not in core then we have a
Catch-22*...

>However I'd prefer to have 5.10 out before.

Yes i can understand that.

cheers
Yves

* from Catch-22 by Joseph Heller:

There was only one catch and that was Catch-22, which
specified that a
concern for one's safety in the face of dangers that were
real and
immediate was the process of a rational mind. Orr was crazy
and could
be grounded. All he had to do was ask; and as soon as he
did, he would
no longer be crazy and would have to fly more missions. Orr
would be
crazy to fly more missions and sane if he didn't, but if he
was sane
he had to fly them. If he flew them he was crazy and didn't
have to;
but if he didn't want to he was sane and had to. Yossarian
was moved
very deeply by the absolute simplicity of this clause of
Catch-22 and
let out a respectful whistle.

        "That's some catch, that Catch-22," he
[Yossarian] observed.
        "It's the best there is," Doc Daneeka
agreed.

http://en.wikip
edia.org/wiki/Catch-22
htt
p://en.wikipedia.org/wiki/Catch-22_%28logic%29


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

[1-10] [11-20] [21-22]

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