3 ms·
Kotlin so crazy with its default-closed, default-final method approach. Do these people even ship software? Or do they ship textbooks? People are acting likely
by yearolinuxdsktp 2y ago
Kotlin so crazy with its default-closed, default-final method approach. Do these people even ship software? Or do they ship textbooks? People are acting likely they are writing chapters of Biblical verse with their code—they knew everything better than the user, including knowing what to hide. It’s OK/good to have extensible code, even if the original did not intend it.
To have every class be final by default and hidden from callers might be sane for shipping a library—-but you definitely should not adopt it as internal policy in your own code base, for your own’s sake. Why should I tax myself with having to worry about calling out extensibility by hand at every step? This is just crazy to me!
I’m all for Kotlin’s success as we desperately need something better than Java still. I’m rooting for you.
The lock-in with Go is the massive copy-pasta style and throw-away code mindset that is pretty much all that I see. But there is very little good Go code out in the wild to show us how it’s done.
- tmountain 2y agoThe standard library is good, readable, and probably the best example of how to write Go code.
- pjmlp 2y agoYes, many of us don't believe on monkey patching. JetBrains and Android manage to ship Kotlin software. Unfortunately software architecture isn't part of most bookcamps, or many devs that rather code away.
- yearolinuxdsktp 2y agoYou are deluded or trolling calling it monkey patching. Dynamically overriding a public method definition is monkey patching. Extending a public class and overriding some public or protected method is not monkey patching, you are crazy if you think it is. You think you thought of the proper public API that your software modules should have? Especially your internal software? Of course you didn’t think of it all ahead of time. It’s a software architecture concept called “open for extension”, look it up. JetBrains doesn’t ship anything with deadlines or that must always stay on. Users can always downgrade the IDE. The number of times I’ve been to turn off the latest feature and try again (to see if the IDE still crashes) is ridiculous. Number of times my build stayed stable after a major IntelliJ Idea upgrade? 50% success rate. I’m rolling the dice on every upgrade. Please let’s talk about shipping software with consequences.