Kotlin is nice
People don’t understand that JIT languages are still compiled, JIT literally describes when it’s compiled.
That said, F# and/or OCaml.
D
Nim
C is memory safe if you program it well enough, so I guess C
Lol. The people downvoting your comment need to get good.
Skill issue.
C? Memory safe? HAHAHAHA
落ち着いてください
deleted by creator
Please work on your Japanese.
deleted by creator
every single language (except Vlang of course) is memory safe if you program it perfectly.
Very, very few humans are capable of doing that, especially with C.
Every car has airbags if you drive well enough. Right?
You can still make stupid mistakes in Rust. It may make it harder to make the most common mistakes, but pretending the guardrails are prevent any type of mistake is asking for a problem to happen.
The only one pretending mistakes can’t happen is the person I replied to. Mistakes definitely can happen and no programming language is fool proof.
Continuing my car analogy, would you rather drive a car with airbags and seatbelts or one without them? Of course you can still have a fatal accident, but it’s nice to have safety features that make it as unlikely as possible.
Ada, hands down. Every time I go to learn Rust I’m disappointed by the lack of safety. I get that it’s miles ahead of C++, but that’s not much. I get that it strikes a much better balance than Ada (it’s not too hard to get it to compile) but it still leaves a lot to be desired in terms of safe interfacing. Plus it’s memory model is more complicated than it needs to be (though Ada’s secondary stack takes some getting used to).
I wonder if any other Ada devs have experience with rust and can make a better comparison?
its* memory model is
I have done quite a bit of C, C++, Ada, and Pascal development. I recently got into Rust. I am still getting used to Rust, but it feels a bit like someone tried to apply Ada to C++. I like the modern development environment, but I am slower writing code than I would be in Ada or C++. The one feature of Ada that I really like and want other languages to adopt is the Rep spec. I write driver code and being able to easily and explicitly identify which symbol corresponds to which bit is really good.
I would use Ada or Spark in a heartbeat if there was an easy-to-use, mature cross-platform GUI library for it.
Hands down, Rust 🦀
Gleam?
https://gleam.run/Honest question, what would make you pick Gleam over Elixir? Both seem to have significant overlap
Isn’t Elixer dynamically typed?
Oh, I forgot that detail, makes sense. Does Gleam already have something equivalent to Phoenix for elixir?
I dunno it looks well designed but I dunno why I would use it instead of Rust.
That is a very specific subset
Garbage collection is still allowed, and technically JIT languages are still compiled so it really isn’t that restrictive
Java, the language so good you compile it twice!
Not that specific tbh, most newer native languages these days are compiled and memory safe (Rust, Swift, Go, Kotlin Native, etc)
<?php declare(strict_types=1)
😏 😁
🏃♂️💨
🏃♂️💨
The dash emoji. Always looks like a fart.
You mean… except Ada?
C++ with -Wall -Werror, and no pointer diddling.
Its definitely best to try and avoid raw pointers, but even if you try really hard I found it’s not really possible to get a Rust-like experience with no UB.
Even something as simple as
std::optional
- you can easily forget to check it has a value and then boom, UB.The C++ committee still have the attitude that programmers are capable of avoiding UB if they simply document it, and therefore they can omit all sanity checks.
std::optional
could easily have thrown an exception rather than UB but they think programmers are perfect and will never make that mistake. There are similar wild decisions with more recent features like coroutines.They somehow haven’t even learnt the very old lesson “safe by default”.
If I wanted memory unsafety I think I would consider Zig instead of C++ at this point.
I recently got bitten by exactly that
std::optional
UB and here I was thinking 🤔 after 12+ years in the industry starting all the way back in the day with C++03 that modern C++ was supposed to make things better.😐
C on Morello (or any other capability machine).
You forgot that beauty - “undefined behavior”!
Memory-safety can guarantee only so much safety! C++ can still blow up in your face, even with all the alleged memory-safety built into C++, thanks to all the UB traps in C and C++.
Rust is the closest language that has no such “gotchas”.
Scala is the the first I used and I like it a lot. If I had more time I’d love to give ocaml a decent try but I don’t think I can get into it these days.