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

2000-08-12 Thread Dan Sugalski
At 12:48 PM 8/13/00 +1000, Jeremy Howard wrote: >Dan Sugalski writes: > > I don't mind if someone overrides the vtable functions for a variable of a > > built-in type--a standard declaration of: > > > > my $foo; > > > > is really shorthand for: > > > >my generic_scalar $foo; > > > > more o

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

2000-08-12 Thread Jeremy Howard
Dan Sugalski writes: > I don't mind if someone overrides the vtable functions for a variable of a > built-in type--a standard declaration of: > > my $foo; > > is really shorthand for: > >my generic_scalar $foo; > > more or less. If a variable gets its vtable functions messed with, well, >

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

2000-08-12 Thread Dan Sugalski
At 12:23 PM 8/12/00 -0700, Larry Wall wrote: >Dan Sugalski writes: >: Yup. It's an issue for things that implement any non-standard semantics for >: existing ops, especially if those ops are overridden at runtime so the >: optimizer doesn't know. It's one thing to mess with tied variables, its >:

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

2000-08-12 Thread Larry Wall
Dan Sugalski writes: : Yup. It's an issue for things that implement any non-standard semantics for : existing ops, especially if those ops are overridden at runtime so the : optimizer doesn't know. It's one thing to mess with tied variables, its : another entirely to make + behave differently.

Re: RFC 15 (v1) Stronger typing through tie.

2000-08-07 Thread John Porter
Nick Ing-Simmons wrote: > John Porter <[EMAIL PROTECTED]> writes: > >> my integer $quux = 4; > > > >I believe that would have to be > > > > integer my $quux = 4; > > > >at least in perl5... > > Well Larry has been using > > my Dog $spot; > > for a while. O.k., I see that now; I wa

Re: RFC 15 (v1) Stronger typing through tie.

2000-08-05 Thread Nick Ing-Simmons
John Porter <[EMAIL PROTECTED]> writes: >Michael Fowler <[EMAIL PROTECTED]>: >> >> use typing; # place your fingers on the home row.. >> >> my integer $quux = 4; > >I believe that would have to be > > integer my $quux = 4; > >at least in perl5... Well Larry has been using my D

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

2000-08-04 Thread Dan Sugalski
At 09:38 PM 8/4/00 -0400, Ken Fox wrote: >Dan Sugalski wrote: > >$foo = 12; > >$bar = something(); > >$bar = $foo; > > > > could work out to: > > > >$foo = $bar = 12; > >something(); > >If $foo is a lexical variable and it hasn't been aliased then >you might be able to do that

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

2000-08-04 Thread Ken Fox
Dan Sugalski wrote: >$foo = 12; >$bar = something(); >$bar = $foo; > > could work out to: > >$foo = $bar = 12; >something(); If $foo is a lexical variable and it hasn't been aliased then you might be able to do that optimization. The following is just as good and safer: $fo

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

2000-08-04 Thread Dan Sugalski
At 12:35 PM 8/4/00 -0400, Chaim Frenkel wrote: > > "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: > >DS> The language semantics of tie strongly impact the internals. tie() is >DS> basically a declaration that the rules are completely different (and >DS> unknown at compile time) for the tied

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

2000-08-04 Thread Chaim Frenkel
> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: DS> The language semantics of tie strongly impact the internals. tie() is DS> basically a declaration that the rules are completely different (and DS> unknown at compile time) for the tied variable. Shoots down optimization a DS> bunch, si

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

2000-08-04 Thread Dan Sugalski
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 t

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

2000-08-03 Thread Nathan Wiger
> 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. > Unfortunately, accessing and manipulating tied variables is incredibly slow, > s

Re: RFC 15 (v1) Stronger typing through tie.

2000-08-03 Thread John Porter
Michael Fowler <[EMAIL PROTECTED]>: > > use typing; # place your fingers on the home row.. > > my integer $quux = 4; I believe that would have to be integer my $quux = 4; at least in perl5... -- John Porter

RFC 15 (v1) Stronger typing through tie.

2000-08-03 Thread Perl6 RFC Librarian
=head1 TITLE Stronger typing through tie. =head1 VERSION Maintainer: Michael Fowler <[EMAIL PROTECTED]> Date: 02 August 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 15 =head1 ABSTRACT Strong typing of variables can be implemented through the already-existent