this post was submitted on 28 Feb 2024
183 points (96.4% liked)

Technology

59402 readers
3333 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

White House urges developers to dump C and C++::Biden administration calls for developers to embrace memory-safe programing languages and move away from those that cause buffer overflows and other memory access vulnerabilities.

you are viewing a single comment's thread
view the rest of the comments
[–] darkevilmac@lemmy.zip 27 points 8 months ago (13 children)

Probably a good idea, plenty of languages out there that can give good performance while being memory safe nowadays.

[–] hagelslager@feddit.nl 7 points 8 months ago (3 children)

Such as? (Non-programmer here, so I don't know the ins and outs of programming languages.)

[–] darkevilmac@lemmy.zip 12 points 8 months ago (1 children)

Zig and Rust come to mind, at least for replacements for low level languages.

[–] parens@programming.dev 2 points 8 months ago (1 children)
[–] darkevilmac@lemmy.zip 6 points 8 months ago

My bad, I was thinking of Nim but wrote Zig for some reason. Long day yesterday 🙃

[–] Jakeroxs@sh.itjust.works 5 points 8 months ago (2 children)
[–] scharf_2x40@lemmy.world 6 points 8 months ago* (last edited 8 months ago) (1 children)

Isn't that only microsoft exclusive and closed source? Also does compiling it really yield the same speed as C, it is garbage collected isn't it?

[–] lemann@lemmy.dbzer0.com 9 points 8 months ago (1 children)

Was always possible to compile+run C# on Linux using the Mono project. Until Microsoft "bought them out" and created .NET Core, a cross platform version of .NET that MS now encourages people to use instead...

Microsoft's new linux compile tools rub me the wrong way slightly, with the telemetry that's opt-in by default.

Mono is still extremely valuable for older .NET Framework apps under WINE though, way easier to setup compared to the official installers from what i've experienced.

No idea how compiled C# compares to C...

[–] sunbeam60@lemmy.one 8 points 8 months ago (1 children)
[–] Jakeroxs@sh.itjust.works 1 points 8 months ago (1 children)

But it also doesn't have memory leaks lol

[–] sunbeam60@lemmy.one 2 points 8 months ago (1 children)

Definitely. I’ve worked professionally in both. They both have a time and place. I’d be fine with moving all the low level stuff to Rust, but transitions don’t happen by decree so C/C++ will be around for the next 100 years too.

[–] Jakeroxs@sh.itjust.works 1 points 8 months ago

True that, I'm only at the beginning of my programming journey, so I have a very rough understanding of the differences, pros/cons, and best use cases for various languages.

[–] Asifall@lemmy.world 3 points 8 months ago

*proceeds to wrap everything in unsafe {}

[–] lolcatnip@reddthat.com 2 points 8 months ago

Rust is the main one for the kind of code that's typically written in C++. Most memory-safe languages make big compromises on performance, but Rust code tends to run about as fast as comparable C++ code.

load more comments (9 replies)