3 ms·
Rust with GC is actually what many people want. And by that I don't mean using Rc<> everywhere nor do I even mean making a GC library and then using GC<> every
by darthrupert 2y ago
Rust with GC is actually what many people want.
And by that I don't mean using Rc<> everywhere nor do I even mean making a GC library and then using GC<> everywhere. I mean having the runtime handle all memory things with you having to think about it only when some extremely rare corner case breaks.
- arethuza 2y agoThat sounds like C#? https://learn.microsoft.com/en-us/dotnet/standard/memory-and-spans/memory-t-usage-guidelines https://learn.microsoft.com/en-us/dotnet/standard/memory-and...
- restlake 2y agoYou are correct, C# straddles that line better than any other language right now imo thanks to the APIs you linked. There was a good write up about this Rust vs C# Span comparison on HN a few weeks ago but the link escapes me
- pjmlp 2y agoD would fit in as well, if the community wasn't so tiny.
- ComputerGuru 2y agoI have been a huge (but lonely) proponent of C# and rust being the best two-language combo. But once (someday! Soon they say!) first-class discriminated union support lands, it’ll be the ideal recommendation for anyone that wants to get away from manually taking care of lifetimes.
- cwalv 2y agoC# was derided as "Microsoft's Java" from the beginning, even though it pulled ahead very early on with generics and never looked back. Microsoft was loathed by many for a long time. Go is popular because Google is (was?) loved/admired.
- neonsunset 2y agoI'm finding F# to be even closer because it has HM type inference, discriminated unions (note they are not as layout-efficient as Rust's, it is better in F# 9 though), is fully expression oriented and overall a quite terse language (Rust isn't really terse but can be made so in some cases). It's worse at dealing with ref structs so C# is better for some low-level tasks. But it has other niceties like IL-level function and lambda inlining.
- timeon 2y agoWhen companies move from Go it is usually because of GC. Tho point of Rust is to be safe language without GC. Even if not perfect, best thing about Rust is borrow checker and border between safe/unsafe. You can use several other languages, like Ocaml, if you want Rust with GC.
- etse 2y agoI’m curious which are the well known projects or products that have ported or converted away from Go. Anyone have a shortlist?
- alfiedotwtf 2y agoI have seen a lot of large projects do this but don’t keep a list. The ones that remember from recently reading about them is Discord and IndexedDB.
- PittleyDunkin 2y agoRust with GC wouldn't look much like rust anymore.
- thomasmg 2y agoI think people want is Rust, but simpler. At least by default. I could imagine people want a programming language that is: memory safe, without GC pauses. A bit slower by default than C / Rust, but with the _option_ to make it as fast. Then easier to learn, less vendor lock-in than Swift, and a modern syntax (no null pointers etc). I don't think such a language exists currently.
- darthrupert 2y agoNim, but whether the syntax is modern is questionable.