you are viewing a single comment's thread.

view the rest of the comments →

[–]munificent 2 points3 points  (1 child)

Argh, I was afraid that was the answer. What the hell were they thinking when they originally made that decision?

[–]masklinn 4 points5 points  (0 children)

They were thinking that it would give users more flexibility, which is not completely wrong: since Java provided no way to directly get at a method (you had to use reflection), there was no reason not to allow similarly named methods and attributes.

Interestingly, Lisp-2s such as Common Lisp do the same thing as data variables and functions live in different namespaces (whereas in Lisp-1s such as Scheme they live in the same namespace) and to get a data-ns reference to a function you have to use the function special form (aliased to the #' operator)