Re: IDEA: my() extensions and attribute declarations

2000-09-25 Thread Alan Gutierrez
On Wed, 20 Sep 2000, Nathan Wiger wrote: Camel-3 shows some interesting hints of what's been proposed for my declarations: my type $var :attribute = $value; And we all know that you can use my to declare a group of variables: my($x, $y, $z); Here's the issues: 1. How do

Re: IDEA: my() extensions and attribute declarations

2000-09-23 Thread Nathan Wiger
Piers Cawley wrote: By declaring a variable as being one of many types you throw away any possible compile time optimizations that may be possible (unless you add the restriction that said types have a common interface...) Note that a possible syntax for doing what you want could be:

Re: IDEA: my() extensions and attribute declarations

2000-09-21 Thread Bryan C . Warnock
On Wed, 20 Sep 2000, Nathan Wiger wrote: my int ($x, $y), char $z; # mix classes my int ($x, $y) :64bit, char $z :long; # and attrs nit my (int ($x, $y), char $z); my (int ($x, $y) :64bit, char $z :long); /nit -- Bryan C. Warnock ([EMAIL PROTECTED])

Re: IDEA: my() extensions and attribute declarations

2000-09-21 Thread Piers Cawley
Nathan Wiger [EMAIL PROTECTED] writes: It seems potentially useful to be able to say: my Dog, Cat $fluffy; As a way to say "$fluffy can be either a Dog or a Cat". Since variables are prefixed, anything comma-separated up to the variable is an alternate class for that variable: Eurgh.

IDEA: my() extensions and attribute declarations

2000-09-20 Thread Nathan Wiger
I don't have time to RFC this now, as I'm leaving soon for several days. So here's a brain dump. Camel-3 shows some interesting hints of what's been proposed for my declarations: my type $var :attribute = $value; And we all know that you can use my to declare a group of variables: