Hacker News new | ask | show | jobs
by AaronFriel 2641 days ago
This is largely not the case outside of the C-like languages that inherited nulls.

Long method chains with a strong type system or a functional (also called "fluent") style are extremely expressive and common in languages that obviate the need to handle null values at every member.

1 comments

Regardless of safety guarantees (or lack thereof), a method chain that long indicates a lot of knowledge of the structure and hierarchy of the dependency. It makes refactoring/testing/mocking more difficult.
What does the length of the method chain have to with anything? Let's say I define an interface Foo.bar.xyz with method call, and I call the implementation foo.bar.xyzimpl.method()

Everything is just as testable and decoupled, it's just a different project structure.

Method chains have nothing to do with the things you stated.