News for hackers. Stuff that matters.
Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by the_duke on Sunday March 07, 2021 @03:02PM (#26379232)
That's an interesting observation.

It definitely has merit. I've run into this exact same thing in type-system heavy languages like Haskell/Scala/Rust, where I spend more time juggling abstractions than implementing features.

But there is an additional dimension: abstractions often make the first implementation much more cumbersome. But most code is maintained and read much more than it is written, and abstractions can make extending and maintaining a code base much easier.

It's also good to remember that the existence of certain language abstractions doesn't mean you have to use them.

You have to find the right tradeoff.

Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by philosopher1234 on Sunday March 07, 2021 @03:11PM (#26379329)
Another point I disagree with the consensus about! Abstractions have their place, but a bad abstraction ends up spending more of its life getting torn down than it does productively simplifying the code. In my opinion each abstraction increases system cognitive load, and so they should only be added “lazily”, ie when empirical experience with the code proves that a particular abstraction would have broad and deep utility.
Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by pron on Sunday March 07, 2021 @06:12PM (#26380706)
But simple languages don't mean more cumbersome abstraction -- take Scheme for example -- while C++ and Haskell's maintenance record isn't particularly great (Rust doesn't have one yet).