just one more oop bro I swear
Pure oopium. All oop ‘design patterns’ exist solely to overcome the inherent flaws of oop.
Comment on Anon tries programming in Java
pivot_root@lemmy.world 5 weeks agoI strongly prefer how interfaces are handled
It’s better than Java, but they still chose to walk headfirst into the same trap that bites Java developers in the ass: placing the implementations under the concrete type instead of the interface.
When you have two interfaces that each require you to implement a function with the same name but a different signature, you’re in for a bad time featuring an abomination of wrapper types.
just one more oop bro I swear
Pure oopium. All oop ‘design patterns’ exist solely to overcome the inherent flaws of oop.
Maybe check before putting words in my mouth, m’kay?
Sincerely, someone who uses composition.
Willem@kutsuya.dev 5 weeks ago
On that last note, can’t you use the explicit interface implementation in C#?
e.g.
pivot_root@lemmy.world 5 weeks ago
I haven’t kept up with recent Java developments, but with Go, you’re out of luck. Interface implementations are—for both better and worse—completely implicit.
Amir@lemmy.ml 5 weeks ago
He mentioned C#, which does let you explicitly choose to implement same-name functions of two interfaces with different code
pivot_root@lemmy.world 5 weeks ago
For some reason, my brain inserted a “like” before “C#”, and answered the question of “can’t you use explicit interfaces like C#.”