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

Programming

17668 readers
174 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Masterkraft0r@discuss.tchncs.de 39 points 1 year ago* (last edited 1 year ago) (3 children)

As an embedded firmware guy for 10ish years:

C can die in a fire. It's "simplicity" hides the emergent complexity by using it as it has nearly no compile time checks for anything and nearly no potential for sensible abstraction. It's like walking on an infinite tight rope in fog while an earth quake is happening.

For completely different reasons: The same is true for C++ but to a far lesser extent.

[–] nayminlwin@lemmy.ml 9 points 1 year ago (1 children)

I don't have first hand experience with it, I also don't get how it would help me. Maybe I need to look at it some more.

[–] colonial@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

Ahh, the consequences of using the PDP-11 as your abstract machine.

I find C fun in small doses, but if I ever had to scale up to an actual product, I'd quickly want to off myself from copy-pasting my vector implementation for every different type it needs to contain.

(Of course, I could commit macro abuse to emulate generics, but... that's just asking for trouble.)

Well it made sense! In the 70s, and just doesn't anymore. 🤷

[–] fkn@lemmy.world 3 points 1 year ago (1 children)

I used to be this way about c++ too... But c++17/22 are not the same language as it was 10 years ago.. And it definitely isn't the language most firmware guys get to use it as.

There is some truly wild shit in the templating system.

[–] Masterkraft0r@discuss.tchncs.de 2 points 1 year ago (1 children)

I'm aware. I write C++17 and I try to be informed what the best praticed are for whatever version of whatever language I'm writing at the moment. But that's actually a reason to not like C++. It's painfully backwards compatible and what was good pratice isn't anymore because now there's a better one, but that better pratice isn't in anyway enforced because of backwards compatibility. And also I don't like templates, generics are superior to me, but that's a me thing.

[–] fkn@lemmy.world 0 points 1 year ago

I too used to think generics were superior until I learned parameter packs, type traits and SFINAE.