this post was submitted on 19 Mar 2024
145 points (92.9% liked)
Programming
17540 readers
199 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
view the rest of the comments
C++ is nicer to use than C, and with currently preferred style it's safer, though not safe in the way Python is.
You might also try Go and Ada. I confess to not having clear understanding of how Rust beats Ada or vice versa. There are very few people really knowledgeable about both, who have addressed this afaik. I can say coding in Ada feels clanky but very solid. Idk yet about Rust.
thanks for the reply. C++ never really clicked for me. I started out decades ago with C and enjoyed living on the edge with older hardware and OSes - when neither the OS nor the hardware will defend itself from an application, things get real fun, real fast.
as PC hardware matured, python filled in the safety spaces when needed and I eventually just used python with C bindings to balance speed and safety as needed for any particular project.
I have never seriously looked at ada, but your comment piqued my interest, so I may just play with it for a bit. Go... what can I say about Go... like C++ its just feels "odd" to me. cant really explain why, perhaps it just feels too.. "google"?
I am going to be taking some time to really try groking Rust over the next 6 months... from what I have seen so far, Rust is the language that I wanted C++ to be so many years ago... fills in many more gaps and gives an expansive playground for various types of projects - many of the benefits of python-like and C-like languages in a nice, unified space.
would love to get your thoughts on that if you have time.
Go is totally different from Rust. It has garbage collection and built-in lightweight threads with message passing, but a fairly simple type system comparable to C's.
Rust and post-2011 C++ have fancier type systems influenced by e.g. Haskell. If you haven't used such languages before, there may be a learning curve, but that temporary confusion you'll feel is the sensation of your brain getting bigger, so it's a good effort to make.
Rust and C++.afaict are mostly designed for systems programming where you want to control resources and memory manually. If you can stand a larger footprint, you might be more productive in a GC'd language. That said, I haven't used Rust yet. Lots of Haskellers like it though.
For Haskell, try learnyouahaskell.com .
For Ada, try http://cowlark.com/2014-04-27-ada/index.html and then "Ada Distilled" (online book, use web search).
I'm not a fan of Go, but calling its type system comparable to C is unfair. C has nothing like Go's interfaces, and Go has generics now. Plus having strings and maps as built-in types is a huge win for convenience. Go's slices are also superior to how arrays are usually done in C (but still a lot less ergonomic than a C++ vector or Rust Vec).
thanks for the excellent reply. will check out all of your links.
I do like built-in light weight threading, so Go is still on the to-play-with list and I am currently tracking a few Go projects to get my feet wet.
you have given me options and impetus to get out of my decades long rut and, honestly, that is the best gift any programmer can give to another. thank you, friend.
You should also look at Erlang and Elixir (same VM, different surface syntax). They have some similarities with Go but aim at higher reliability in the presence of faults. Erlang was originally designed to run phone switches, and it was a critical requirement that the switch keeps running even if some part of it goes wrong.
Coding is rust is amazing. It feels so right