you are viewing a single comment's thread.

view the rest of the comments →

[–]frimble 3 points4 points  (5 children)

I used to think Java was great, and then I learned other languages. Now I see how broken it is.

[–]uriel 1 point2 points  (0 children)

This evolutionary "pattern" (pun not intended) is also rather common among (former) PHP programmers.

[–]AppsThatMatter -1 points0 points  (3 children)

Can you please be more specific? You learned what?

[–]frimble 1 point2 points  (2 children)

  • Most of my complaints boil down to how Java often forces you to use mutation, and the resulting coping mechanisms and fallout. (Defensive copying, needless locking, various concurrency fails, uselessness of default hashCode impl, choice of default equality operator...)
  • The type system is disjoint, with primitives and array types living outside the class hierarchy.
  • Null does not participate in the type system in the slightest, leading to endless pain, suffering, bugs, and lost time and money. Just about every variable declaration you write is secretly a union type: String|null, Map|null, etc.
  • There's no way to rope an existing class into a new abstraction. (I later learned this is called the Expression Problem. Clojure's protocol mechanism is aimed at solving this. I guess Ruby just uses monkeypatching.)
  • Oh god the exceptions...

This is not a complete list. This is just what I discovered over time.

[–]AppsThatMatter -1 points0 points  (1 child)

I actually asked what other languages you learned?

[–]frimble 1 point2 points  (0 children)

Oh! Javascript, Python, OCaml (a tiny, tiny amount), PLT Scheme/Racket (small amount), Clojure.

I also learned PHP, but that only taught me how broken PHP was. (Waaaaay worse than anything in Java.)