On Wed, May 23, 2007 at 04:33:23PM -0700, Jonathan Lang wrote:
: >From S02:
: 
: --
: 
: Perl 6 includes a system of B<sigils> to mark the fundamental
: structural type of a variable:
: 
:    $   scalar (object)
:    @   ordered array
:    %   unordered hash (associative array)
:    &   code/rule/token/regex
:    ::  package/module/class/role/subset/enum/type/grammar
:    @@  multislice view of @
: 
: C<$x> may be bound to any object, including any object that can be
: bound to any other sigil.
: 
: C<@x> may be ... bound to any object that does the C<Positional> role
: 
: C<%x> may be bound to any object that does the C<Associative> role
: 
: C<&x> may be bound to any object that does the C<Callable> role
: 
: C<::x> may be bound to any object that does the C<Abstract> role
: 
: --
: 
: IIRC, could the above section about C<$x> be considered equivalent to
: saying that C<$x> may be bound to any object that does the C<Object>
: role?
: 
: Also, a possible change in terminology:
: 
:  s/C<Positional>/C<< sigil:<@> >>/
:  s/C<Associative>/C<< sigil:<%> >>/
:  s/C<Callable>/C<< sigil:<&> >>/
:  s/C<Abstract>/C<< sigil:<::> >>/
:  s/C<Object>/C<< sigil:<$> >>/ if every object does the Object role
: 
: This would free up more role names for programmer use.  It would also
: imply that one could create a new sigil by defining a role named
: 'sigil:<...>', with the behavior of the sigil being established by the
: definition of the role.  Or does this make it too easy to create new
: sigils?

Well, it's already too easy, but the problem I have with it is not
that.  My problem is that sigil:<@> is the name of a very specific
syntactic notion, while Positional is the name of a very generic
semantic notion.  I don't think those levels should be confused.

Larry

Reply via email to