Perl6 RFC Librarian writes:
> =head1 TITLE
> 
> Less line noise - let's get rid of @%

I have some problems with this RFC:

 * 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

 * current typing provides rudimentary compile-type checking.
   Saying:
     $foo = (1,3,5);
   gives a warning.  Saying:
     %foo = "Nat";
   gives a warning.  You'd lose that.  To get it back you'd need
   verbally-typed variables:
     $foo :scalar = (1,3,5);    # to get the warning
   and even then it's not necessarily going to be possible to make
   that elicit a warning at compile-time.

 * 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.

 * 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 '@'.

Nat 

Reply via email to