this post was submitted on 13 Nov 2023
98 points (92.2% liked)

Programming

17098 readers
84 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] kool_newt@lemm.ee 5 points 10 months ago* (last edited 10 months ago) (3 children)

Zig

Choosing a high-level language would limit your world so all of those are out. I could make my own high-level language if absolutely necessary from Zig but the reverse is not possible.

Zig > C as it's easier to write safer more secure code while being as fast or even faster than C, and usable in embedded and other places only C is normally used. In fact, I can create C binaries with my Zig compiler.

Zig > Rust because actually writing safe Rust code would use all my time and sanity so would end up writing unsafe Rust, but then what's the point.

Zig > Go because Go is slower, higher level, and backed by one of the most evil entities to ever exist.

[–] deur@feddit.nl 10 points 10 months ago

If you cannot write safe Rust code, it places your ability to ever write safe code in doubt.

[–] porgamrer@programming.dev 7 points 10 months ago

You could write a compiler for a low-level language in anything. Honestly makes little sense that most people do it in C++ when they're only going to replace it anyway.

[–] philm@programming.dev 4 points 10 months ago (1 children)

Zig > Rust because actually writing safe Rust code

Start thinking more functional, I rarely have issues with the borrow-checker, or even have to write unsafe. But it obviously depends on the context, when the issue at hand really requires a lot of interior mutability or unsafe can be pain.

I'm also super fast nowadays with Rust, probably faster than with any other language (thanks to great tooling?).

[–] kool_newt@lemm.ee 2 points 10 months ago

Start thinking more functional

Sounds like good advice, thx.