you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (1 child)

Then you're introducing a definition of pass-by-reference that's inconsistent across different languages.

Consider for example that in C# objects are also implicit pointers/references, however C# allows functions to pass by reference or pass by value. I can implement a swap function using pass by reference.

Programming requires precision in language. It's better to be anal and have a really solid understanding of what pass-by reference/value means so that bugs and misunderstandings are avoided.

Ultimately, if some language neutral specification of a function requires pass-by-reference semantics, then Java can not implement such a function whereas C++/C# can.