[MUD-Dev] Mud Languages

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Fri Aug 8 08:18:35 CEST 1997


[Nathan Y:]
:							      Also, don't
:pull stunts like the addition sign in a string in Java. Its annoying, to
:say the least, to have operator overloading in a single special case, and
:not anywhere else in the language.

Gee, that's exactly what I've done. I don't think of it as operator
overloading, however, since there is no way for a programmer to define
new operators or new operator meanings. The base language uses '+' for
addition of ints, of fixeds, and of strings. That's all. It uses '=' for
comparison of all types in the system.

My implementation language, 'Draco', does in fact allow operator overloading
when defining new types, but I've never used it (other than for a complex
number package done as an experiment). I find overloaded operators to
be too unreadable - I much prefer a descriptively named function.

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA



More information about the mud-dev-archive mailing list