MUD-Dev
mailing list archive

[ Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

Re: [MUD-Dev] Mud Languages



[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



[ Other Periods  | Other mailing lists  | Search  ]