Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Effectively; 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.



> 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++.


The syntax was just an example ;)

What I described is actually closer to ML.


Has nothing to do with syntax.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: