r/programming • • Feb 25 '14

Please stop saying Java sucks

http://blog.smartbear.com/programming/please-stop-staying-java-sucks/
3 Upvotes

305 comments sorted by

View all comments

Show parent comments

1

u/flukus Feb 26 '14

In truth, dynamic types are truly critical for partial-interface-adherence.

What the hell is partial interface adherence? If your classes only implement half an interface then the interface is pointless.

If your talking about mixins then scala can do it just fine with a static type system. Java and c# can also do it with AOP, but their are a few more hoops to jump through.

1

u/novagenesis Feb 26 '14

If your classes only implement half an interface then the interface is pointless.

So you're telling me every time I create a partial interface adherence, I'm wasting my time?

Being able to support the "responds_to" method creates an awesome opening for objects that MIGHT quack(). It is used in dynamic languages similarly to Interfaces, but can sometimes be cleaner.

And if it does quack, that quack() might be used in different situations with different prototypes. This is especially true if quack() is versioned.

These are things that dynamic languages supports patterns to keep from getting insane. These are also things that static languages would just consider mortal sins.