336
you are viewing a single comment's thread
view the rest of the comments
[-] idunnololz@lemmy.world 57 points 3 years ago

You can always solve a problem by adding more layers of abstraction. Good software design isn't to add more layers of abstractions, it's to solve problems with the minimum amount of abstractions necessary while still having maintainable, scalable code.

There are benefits to abstraction but they also have downsides. They can complicate code and make code harder to read.

They can complicate code and make code harder to read.

amen.

[-] jvisick@programming.dev 3 points 3 years ago* (last edited 3 years ago)

But have you heard of Rust? Rust has zero-cost abstractions! Zero cost!

[-] bold_omi@lemmy.today 1 points 3 weeks ago* (last edited 3 weeks ago)

From Following up on "Hello, World", by Drew Devault (emphasis added):

There has long been a trend in computing of endlessly piling on the abstractions, with no regard for the consequences. The web is an ever growing mess of complexity, with larger and larger blobs of inscrutable JavaScript being shoved down pipes with no regard for the pipe’s size or the bridge toll charged by the end-user’s telecom. Electron apps are so far removed from hardware that their jarring non-native UIs can take seconds to respond and eat up the better part of your RAM to merely show a text editor or chat application.

The PC in front of me is literally five thousand times faster than the graphing calculator in my closet - but the latter can boot to a useful system in a fraction of a millisecond, while my PC takes almost a minute. Productivity per CPU cycle per Watt is the lowest it’s been in decades, and is orders of magnitude (plural) beneath its potential. So far as most end-users are concerned, computers haven’t improved in meaningful ways in the past 10 years, and in many respects have become worse. The cause is well-known: programmers have spent the entire lifetime of our field recklessly piling abstraction on top of abstraction on top of abstraction. We’re more concerned with shoving more spyware at the problem than we are with optimization, outside of a small number of high-value problems like video decoding. Programs have grown fat and reckless in scope, and it affects literally everything, even down to the last bastion of low-level programming: C.

Can abstractions be useful? Yes. But we must be extremely cautious of their scale so as to avoid an Electron situation.

this post was submitted on 01 Sep 2023
336 points (96.2% liked)

Programming

29476 readers
135 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS