It seems that the fundamental problem is the dichotomy between
a scalar, and a list of 1 elem. Thus, we want

  $a = 7

to DWIM, whether I mean a list, or a scalar. Seems to me that
the best way to solve a dichotomy is to declare it to not to
be one: a scalar *IS* a list of one element. The only thing
that needs to go is the inappropriate casting in numeric
context.

This leads to a second clarification, which has bothered me
wrt perl6: the purpose of sigils. If everything is an object,
and objects are $ things, then why have sigils? I think the
answer is that the sigil defines the default interface
("skin"?) on an object. So,

  $a = 7;
  @a = 7;

both create identical objects; but the interface to these
objects is different. so +$a == 7, while +@a is 1.

Next:

  $b = 7, 6, 5
  @b = 7, 6, 5

Again, both create identical objects, under different
interfaces. But now we have a problem with +$b: what should
this mean? To be consistant with +$a (above), I would
suggest that it simply returns the sum of its elements
(i.e. +(1,2,3) == 6).


Dave.

Reply via email to