4 ms·
>Boilerplate optimizes for the right things - code that's easier to read and analyze, but takes longer to write. This is wrong and the same retarded logic Java
by reader_mode 5y ago
>Boilerplate optimizes for the right things - code that's easier to read and analyze, but takes longer to write.
This is wrong and the same retarded logic Java used to defend not introducing var and similar features for ages. Boilerplate is usually noise around the actual logic - it's a result of limited abstractions. When you're repeating same code over and over you raise that segment to a separate concept, that's how abstraction and high level programming works - it increases readability and maintainability. Being easier to type has nothing to do with it.
- staticassertion 5y agoThanks for being the person who I knew would try to make this about Java. I don't care about Java, it was a trivial example. The rest of your post doesn't really have to do with mine. Yeah, you can cut down on boilerplate with changes to languages... duh. But in terms of conveying context there's always a tradeoff of explicit vs implicit, and one of those costs is taking the time to actually turn your mental model into a written implementation - this eases that burden. As I said, it's a fancy autocomplete.
- reader_mode 5y ago>But in terms of conveying context there's always a tradeoff of explicit vs implicit Exactly - if a tool let's you write it explicitly too easily you're making that the default, and it ignores the readability/maintainability side of the tradeoff. Maybe it gets good enough to recognise when things can be factored out for better readability as well. But in my experience code generators rarely result in maintainable code.