3 ms·
> or allow the programmer to specify which one should be used with an annotation. That's exactly: > give all of those functions different names.
by fredmorcos 10y ago
> or allow the programmer to specify which one should be used with an annotation.
That's exactly:
> give all of those functions different names.
- nradov 10y agoSimilar, but not exactly the same. It would make the syntax and documentation a little cleaner.
- chriswarbo 10y agoEffectively; although "name" usually implies an opaque symbol, e.g. the language would see no difference between, say, "addAsInts" vs. "addAsFloats", compared to "addAsInts" vs. "divide". Classes, namespaces, modules, etc. allow names to have a more fine-grained structure, e.g. "int.add" and "int.divide" come from the same module, whilst "int.add" and "float.add" are alternative implementations of the same signature.
- fredmorcos 10y ago> whilst "int.add" and "float.add" are alternative implementations of the same signature. Maybe in a functional programming language like Haskell. But not in C++.
- chriswarbo 10y agoThe syntax was just an example ;) What I described is actually closer to ML.
- fredmorcos 10y agoHas nothing to do with syntax.