News for hackers. Stuff that matters.
Re:The Cost of Abstraction (2016) by ken on Sunday February 24, 2019 @11:25AM (#19239167)
I confess I've never seen that happen, but I do think excessive abstraction is killing the argument this article is trying to make.

When would anyone ever make an inc_pair function? Or a hierarchy of 'animals that lay eggs'? I guess these are supposed to be examples of something, but I'm not sure what. I wouldn't even call them "abstraction". They seem like completely hypothetical examples of how to apply programming language features to non-problems in bad ways.

Without knowing what the designer of these programs is trying to model, it's impossible for me to understand what they're trying to accomplish or why they think applying these language features in this way makes sense at all.

Both of these examples sound like they increase the number of lines of code, for no appreciable benefit, and I recall Yegge's old observation that the main issue with any codebase is simply the bulk of it.

Re:The Cost of Abstraction (2016) by dllthomas on Monday February 25, 2019 @09:03PM (#19251408)
> completely hypothetical examples of how to apply programming language features to non-problems in bad ways.

If that were Randall Munroe's next book, I'd buy a copy.

Re:The Cost of Abstraction (2016) by Tarean on Sunday February 24, 2019 @05:52PM (#19241173)
On the other hand, the lens library in haskell is extremely abstract. Libraries obviously have different tradeoffs but using lens can increase the onboarding cost significantly for new team members.

I am mentioning lens because it has a both function:

    incBoth = both += 1
Which has a fun type signature:

    incBoth :: (Bitraversal p, MonadState (p a a) m,  Num a) => m ()
Re:The Cost of Abstraction (2016) by tome on Monday February 25, 2019 @11:19AM (#19246659)
Hmm, don't you use it as a monadic action like

    do
        ...
        both += 1