On Fri, 11 Oct 2002, Dan Sugalski wrote:
: I think that, for me at least, it'll be close enough to C to be 
: really confusing. (I already have the problem of leaving parens off 
: of my function calls when I write XS code...) There's a certain 
: appeal to not having to swap in almost-but-not-quite-the-same sets of 
: punctuations when moving from language to language.

And now for something completely not quite different...

    bits($x & $y)
    bits($x | $y)

That is, bits() could just be a function that takes a superposition
and interprets it as bitops, which makes an odd kind of sense.
Or we could fix the "if this number was never used as a string"
problem by differentiating integer ops from string ops:

    intbits($x & $y)
    intbits($x | $y)
    strbits($x & $y)
    strbits($x | $y)

One could maybe shrink that down to

    int($x & $y)
    int($x | $y)
    str($x & $y)
    str($x | $y)

Except that's not really much different than:

    +($x & $y)
    +($x | $y)
    _($x & $y)
    _($x | $y)

And that would conflict with Damian's current notions of how superpositions
behave in numeric or string context.  Still, you can see how

    bits(1|2|4|8)

could be made to work even if it really meant

    bits(any(1,2,4,8))

Larry, still thinking about a language vaguely resembling Perl 5.  :-)

Reply via email to