Nathan Torkington wrote:
> * you misunderstand the purpose of $ and @, which is to indicate
> singular vs plural. You say a $ indicates a string or number,
> but really it indicates a single thing. Similarly @ isn't just
> a variable marker, it's used to indicate that you get multiple
> things:
> @foo[2..10]
> @$foo
No I completely understand their purpose, I just argue it is no
longer useful.
> * current typing provides rudimentary compile-type checking.
> Saying:
> $foo = (1,3,5);
> gives a warning. Saying:
this would create a $foo array
> %foo = "Nat";
> gives a warning. You'd lose that. To get it back you'd need
this would give a syntax error!
> * no sample code. If you're proposing something as big as this,
> I *really* want to see how it's going to change the language.
> Take an existing 30 line program that does lots of work with
> variables and convert it. Show me how it affects things like
> slices. I want to make sure that code that is currently easy
> doesn't become hard.
good point. what code would you like? don't get mean. :)
> * you complain that @foo will become more meaningless once we have
> different data structures that act as collections. You don't
> consider using @foo for those, though:
> my @foo : FIFO = (4,5);
> This fits in with my personal vision of how Perl6 will handle
> new data types: better support for tie, basically. You can plug
> in your own C or Perl code to implement new types that masquerade
> as scalars, arrays, or hashes. Someone else suggested this in
> the thread, and you treated it as already dealt with in the RFC,
> but I don't think it's dealt with at all. I can't see how saying
> my @foo : SOME_TYPE_THAT_IMPLEMENTS_ARRAY_OPERATORS = (4,5);
> is going to debase the meaning of '@'.
"Groups" is a meaningless concept. You have particular objects which store stuff.
Is an image of a distant galaxy singular (one image) or plural (ten zillion pixels).
My argument, based on my practical experience, is that all the @% are essentially
useless now.
Karl