Adding Unicode operators to D
Simen Kjaeraas
simen.kjaras at gmail.com
Sun Oct 26 17:01:41 PDT 2008
On Mon, 27 Oct 2008 00:41:26 +0100, Bill Baxter <wbaxter at gmail.com> wrote:
> Same thing goes for downs' in-fix operators. I think his syntax is
> /infix/ which means that his ops always have the same precedence as
> division.
> I'm guessing this Python Cookbook recipe is very similar to Downs'
> technique. It discusses pros and cons and such.
> http://code.activestate.com/recipes/384122/
>
> --bb
An interesting read, though I have looked at downs' code before. It
occured to
me now that this could sorta have been fixed with a preprocessor, just
define
an operator to have the same precedence as an already existing operator,
define
an alias that gets replaced with /foo/, +foo+, or whatever operator you
chose.
I guess we're stuck waiting for macros in the meantime.
--
Simen
More information about the Digitalmars-d-announce
mailing list