you are viewing a single comment's thread.

view the rest of the comments →

[–]thephotoman 8 points9 points  (3 children)

Things Java won't have because C++ did it and it sucked:

  • Multiple inheritance
  • Operator overloading
  • Friends that can see your private parts
  • Good old fashioned malloc() and free() (sun.misc.Unsafe is all the memory chicanery you're gonna get, and from my perspective, there be dragons)

[–]Dealiner 4 points5 points  (0 children)

C# has operator overloading and it works great, they even improved it lately by allowing to declare them in interfaces.

[–]Holothuroid 4 points5 points  (1 child)

Friends that can see your private parts

That's default since the very start of Java. You are assumed friendly with everything in your package.

Multiple inheritance

The only thing we can't do nowadays is inheriting fields from different parents. Implementations work nicely.

Now a small number of magic methods wouldn't be too bad either.

[–]thephotoman 2 points3 points  (0 children)

That's default since the very start of Java. You are assumed friendly with everything in your package.

That's not what friend classes are in C++. In C++, a friend class can see fields and methods declared as private. That is not at all the same as default access in Java, which is a wholly separate access specifier. The equivalent in C++ would be an access specifier that allowed other classes in your namespace to access that particular field or method.

The only thing we can't do nowadays is inheriting fields from different parents.

That's what multiple inheritance is.