Ops Review
Bob Rogers
rogers-perl6 at rgrjr.dyndns.org
Mon Jan 19 21:41:21 UTC 2009
From: chromatic <chromatic at wgz.org>
Date: Mon, 19 Jan 2009 13:09:14 -0800
I've skimmed all of the ops in our .ops files, and here are my
recommendations for deprecations. This is a first pass, so I may
have missed a few ops we don't need (especially variants), and I may
recommend removing something you use, so let's consider this a work
in progress:
How often do we use the bitwise ops?
- could they become functions?
- multidispatch functions?
- means pulling them out of vtables, which doesn't hurt my feelings
Kea-CL currently uses some of these ops, but will probably need most if
not all eventually. But I wouldn't object if you wanted to change how
they were invoked. It seems to me that they are common operations
required by most languages, so Parrot ought to provide at least the
basic forms.
Ops to remove:
set_addr/get_addr
I don't have a use case for get_addr, but how does one initialize a
Continuation without set_addr?
pushmark/popmark/pushaction
pushaction is is the only way I know of to support the equivalent of
LEAVE blocks, and pushmark/popmark the only way to get rid of them in
the normal exit case. Is there a replacement for pushaction yet?
Experimental ops:
- drop all except iter, exec, find_sub_not_null
pow seems useful, even though there is only a pow_n_n_i version. But I
suppose the other cases are subsumed by the infix version, and this
could be also?
Math ops:
- ceil/floor
- transcendental ops
- gcd/lcm/fact
What are you suggesting as replacements? Or (with the probable
exception of fact) must every language reinvent these wheels?
-- Bob Rogers
http://www.rgrjr.com/
More information about the parrot-dev
mailing list