develooper Front page | perl.perl6.language | Postings from August 2000

Re: Imrpoving tie() (Re: RFC 15 (v1) Stronger typing throughtie.)

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
August 4, 2000 07:53
Subject:
Re: Imrpoving tie() (Re: RFC 15 (v1) Stronger typing throughtie.)
Message ID:
4.3.2.7.0.20000804104931.00b69390@24.8.96.48
At 03:59 PM 8/3/00 -0700, Nathan Wiger wrote:
> > Several people have requested strong typing as a feature, but have been 
> shot
> > down with reasons such as "it's un-Perl-like", with an added "it'll slow
> > everything down for those who don't want it".
>
>Definitely.

Maybe. And it may speed things up. And finally if we do the vtable 
implementation of variables, at worst it'll only impact those variables 
that are strongly typed.

> > Unfortunately, accessing and manipulating tied variables is incredibly 
> slow,
> > so improving their speed is a large part of making this proposal feasible.
>
>I think a lot of effort should be put into improving tie(). There are
>tons of advantages to tie, and it could be used in incredibly flexible
>ways in Perl6 as I see it. While this is mainly an internals issue, I
>think it should be pretty high on the priority list.

The language semantics of tie strongly impact the internals. tie() is 
basically a declaration that the rules are completely different (and 
unknown at compile time) for the tied variable. Shoots down optimization a 
bunch, since access to a tied varible has to be treated as a function call 
rather than as access to data with known behaviours.

					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