gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

is overloading or is overloaded annotation #115

Open kjx opened 8 years ago

kjx commented 8 years ago

We have annotations to signal overriding: now we have arity overloading, should we have an annotation to signal that?

(because I don't particularly like arity overloading, I'd go so far as to say an annotation to permit overloading)

apblack commented 7 years ago

Presumably overloading(...) would take an argument listing the other overloadings?

We should probably do the same for methods that share name parts with other methods. So assert(_)shouldBe(_) overloads assert(_), and assert(_)shouldBe(_)description(_) overloads assert(_)shouldBe(_).

Presumably the intent is to make readers of the code defining a module aware that the use of overloaded names is intentional? It might also help to detect the spelling mistakes (shoudlBe instead of shouldBe) that I just corrected.

Or: we could write tests.