[Home] [Groups] - Message: [Prev in Group] [Next in Group]
2873: Re: [MUD-Dev] Mud Languages
[Full Header] [Plain Text]
From: "Chris Gray" <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 8 Aug 97 08:18:35 MST
Organization: Kanga.Nu
[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@ami-cg.GraySage.Edmonton.AB.CA