At 03:55 PM 10/2/00 -0700, Nathan Wiger wrote:
> > Or are we talking apples and oranges and the above declaration is intended
> > to declare that any *member* of @a is of SomeType, never mind the array
> > itself?
>
>Yes, I think that second sentence hits the point. Currently, there's
>ambiguity as to whether or not a type declaration on an array/hash means
>to be applied element-wise or whole-component-wise.
>
>If it's the latter, then there's no problem. And I suspect that's how
>we'd want it to play out. I was just raising the concern that with the
>current ambiguous non-definition of types (it's "conceptware" at this
>point :), it could mean either one.
>
>I pushed a lot of these issues in RFC 319 and 337, which would let you
>say something like:
>
>    my Pet @pets :mean;         # integrated implicit tie
>    @pets->attributes('mean')   # "true", like 'can'

I may be raining on your RFC 337 parade here (sorry I didn't get to it 
earlier - travel), but I think it entirely reasonable to want to specify a 
type for an array different from the type of thing it contains.  But what 
syntax will you use?  If I make one up for the sake of illustration:

     my DogPound(Dog) @kennel :homeless;

then @kennel->municipality, but $kennel[37]->breed.  Make sense, or should 
I just go back to bed?

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to