to avoid joining the HURD of Agile Languages
I've been a pretty heavy duty user of Python lately and at first it was rather tough on me because I had no stop symbols anywhere - there are very few special characters in Python. But after awhile I got used to that.

Then I realized something. Python has a number of sequence types built in and C++ has even more, which they refer to as containers. The neat thing about this army of sequence types is they share a common set of methods. Sometimes via inheritance and sometimes via typed function calls.

Perl5 ships with a single list type called an array. Other list-like types don't get the sigil treatment and have to be operated on via a completely different syntax.

Please RSVP as to whether Perl 6 will allow one to use various container implementations under the hood instead of being limited to a particular implementation for the @ sigil type.

We already have a full library of containers implemented in Perl, it's just a question of whether it will be easy to pop them into the array sigil on demand and use like any other array.

(!sigil_overload) and # hexacamel's fate is a no brainer. like pentacamel { it will trip and fall on => the sigil wall when => overloaded with various containers. }

Replies are listed 'Best First'.
Re: Why did the 6-legged camel try to cross the sigil wall?
by Jenda (Abbot) on Oct 10, 2006 at 12:17 UTC
Re: Why did the 6-legged camel try to cross the sigil wall?
by ysth (Canon) on Oct 10, 2006 at 17:29 UTC
    I can't speak to Perl6, but Perl5 provides the tie interface to allow you to put anything you want in place of an array or hash and access it will regular hash or array manipulation. And it provides object construction/method calls for any other kind of access, though in perl5 that means the scalar sigil must be used, unless you do something wacky like:
    perl -wle'sub new { bless $_[1] } sub foo { print "foo!" } main->new(\ +my @x); (\@x)->foo()'
    And you can combine the two by saving the tied object or getting it with tied() and calling methods on it to access the tied hash/array in ways not built in to the hash/array interface.
    perl -wle'sub foo { print "foo!" } use Tie::Array; @ISA="Tie::StdArray +"; tie @x, "main"; tied(@x)->foo()'
    (Hey, look, there's no $ sigil there either.)

    An example of what you are actually looking to do would have been easier to understand than your description.

Re: Why did the 6-legged camel try to cross the sigil wall?
by Anonymous Monk on Oct 10, 2006 at 10:17 UTC