develooper Front page | perl.perl6.internals | Postings from January 2002

RE: Using stringified address

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
January 1, 2002 10:30
Subject:
RE: Using stringified address
Message ID:
5.1.0.14.2.20020101132804.022e8878@pop.sidhe.org
At 01:11 PM 1/1/2002 -0800, Sterin, Ilya wrote:
> > From: Dan Sugalski [mailto:dan@sidhe.org]
> > At 11:09 AM 1/1/2002 -0800, Sterin, Ilya wrote:
> > >Ok, I understand that this hasn't been implemented due to
> > the believe
> > >that it's a dangerous feature (Programming Perl).  But would
> > it be ok
> > >to enable/disable it with a specific pragma?
> >
> > Might happen. Larry's talked about it on and off, and if you
> > have a special
> > scalar type that's fine. Can't bang the hardware without
> > something like
> > this, and you can already sort of do it with pack and unpack. Sort of.
>
>It would be very useful (I'm being selfish here maybe).  Might even be
>sort of like pointer arithmetic (in disguise), though it would be used
>for that right:-?

Nah, never used for that. Well, except for the bits of parrot written in 
perl/python/ruby,

> > We may have a Pointer class in parrot when we ship. Or we
> > might not. (Care
> > to write one? :)
>
>Besides allowing to work with constant addresses, would it also allow
>pointer arithmetic, or am I going to far with this?
>I can take a shot, though wouldn't be for another week or two.  I'll
>contact you if I need more info on how far do we want the functionality
>to expand.

I can think of a number of different ways to do this. Different behaviour 
based on assignment/read types (integer read/write get/set the pointer 
address, string read/write get/set the data pointed to) would probably be A 
Bad Thing. Also what I'd be likely to do, but I think we've already 
established I do Bad Things. :)

A method to change the address would probably be the best thing.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About