In article <[EMAIL PROTECTED]>, Larry Wall
<[EMAIL PROTECTED]> wrote:

> : Later in the "Literals" section of S02, there's a chart of the
> : corresponding forms for fat arrow, pair, and paren notation. It has
> : 
> :    a => 'foo'      :a<foo>      :a(<foo>)
> : 
> : That looks like it might mean that these are corresponding forms:
> : 
> :    8 => 377    :8<377>    :8(377)
> 
> The first is just a pair of 8 and 377, and has no special numeric
> significance.  The adverbial syntax is special in that, for ordinary
> pairs, what follows the colon must be an identifier, so :8<377>
> would ordinarily be illegal. 

Did I miss this in the spec somewhere? I've basically assked the same
question in regards to file tests. I wouldn't be asking the question if
the spec didn't keep talking about pairs and adverbs being the same
thing. If the Pair and adverbs aren't different syntax for the same
thing, how should that affect that chart in S02?

> The :8(377) above is a bit wrong, by the way, and works only because
> decimal 377 happens to stringify to something that looks like an
> octal number.  You couldn't, for instance, say :16(deadbeef) unless
> deadbeef() was a 0-ary (or listop with no args) function returning
> a hex string.

Could you have :16('deadbeef')? Should the :8(377) still work (so, does
'wrong' mean it won't do what I'm thinking it will do, or that it does
mean that Perl 6 won't compile it, or some other sort of wrong)?

Reply via email to