4 ms·
> Java's references are misnamed. That's silly. Why should every other language adhere exactly to C++'s definition of a reference? 'Reference' as a concept exi
by tomjakubowski 12y ago
> Java's references are misnamed.
That's silly. Why should every other language adhere exactly to C++'s definition of a reference? 'Reference' as a concept exists outside of computer programming and Java isn't wrong to repurpose the term in a different way than C++.
Consider also that C++ has 'dependent types', despite pretty much no relationship to the more well-known definition of dependent types. There are only so many ways to name something.
- evincarofautumn 12y agoThere are also two uses of “dependent” in C++: the resolution of a name can depend on a type parameter, so you have to specify whether you want to treat it as a type name; and a type can depend on (compile-time) values. The former has nothing to do with dependent typing, but the latter does!
- zvrba 12y ago> That's silly. Why should every other language adhere exactly to C++'s definition of a reference? It would be silly if NullPointerException were named something else.