Front page | perl.perl6.internals |
Postings from July 2002
Re: we need more ops.
Thread Previous
From:
Dan Sugalski
Date:
July 30, 2002 10:10
Subject:
Re: we need more ops.
Message ID:
a05111b06b96c78458956@[63.120.19.221]
At 10:43 AM -0400 7/29/02, Melvin Smith wrote:
>At 10:45 AM 7/29/2002 +0100, Nicholas Clark wrote:
>>[Maybe we should have a competition to suggest the most crazy three character
>>operator - ie state your sequence of three characters (not necessarily ASCII,
>>but it helps), state their name, and state their purpose (including whether
>>listop, binop, uniop, precedence, associativity or whatever else helps make
>>your entry more humorous. So presumably there could be a :-) operator, but
>>offhand I can't think of something plausible it could do. And does the
>>tie-fighter need an X-wing operator to complement it? (not sure what that
>>one would look like, let alone what it would do)]
>
>Thats funny, but you have a point there.
>
>The VM and assembler does not need to provide every operator as
>an new 'op'. Eventually, languages with funky operators need to start thinking
>about implementing them as methods or such.
This is definitely true, for ease of use and maintenace if nothing
else. However, if a language does want to provide ops for its
operators, that's not really something we should care about. Also,
the one big upside to ops is that they're JITtable, where method
calls aren't.
Ultimately doing things as a (dynamically loaded) op will make the
running of the code faster, since op calls are lower overhead than
method calls. The runtime will likely be smaller as well. The
downside is a larger compiler side.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk
Thread Previous