Bart Lateur writes: : Yeah. But no cheers then. The problem still remains: you can access a : hash in the normal way in plain code, but inside a sub, you can mainly : only access a passed hash through a reference. Won't be a problem. : It's annoying to basically having two ways of doing something, and one : of them can't be used half of the time. : : Even though @foo and %foo may be two different structures, a scalar $foo : can only reference one of them at a time. : : Are you going to provide a simpler aliasing mechanism to turn a hash : reference, for example as passed to a sub as an argument, back into the : full-blown hash? Simpler (and safer) than the much frowned upon : assignment to a tyeglob, that is. Yes. In fact, a %hash prototype will provide a scalar context, forcing a %foo arg to return a reference, and that ref will be aliased to %hash. You will be required to do something explicit to declare an argument that supplies list context and slurps the rest of the args. (There will also be an explicit way to slurp a list of items but supply scalar context.) Larry
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Edward Peschko
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Peter Scott
- Re: Strings vs Numbers (Re: Tying & Overloading) Randal L. Schwartz
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) David L. Nicol
- Re: Strings vs Numbers (Re: Tying & Overloading) Casey West
- Re: Strings vs Numbers (Re: Tying & Overloading) Jonathan Scott Duff
- Re: Strings vs Numbers (Re: Tying & Overloading) Russ Allbery
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) nick
- Re: Strings vs Numbers (Re: Tying & Overloading) Jonathan Scott Duff
- Re: Strings vs Numbers (Re: Tying & Overloading) Branden
- Re: Strings vs Numbers (Re: Tying & Overloading) John Porter
- Re: Strings vs Numbers (Re: Tying & Overloading) Branden