News for hackers. Stuff that matters.
Re:Removing Garbage Collection from the Rust Language (2013) by raincole on Monday September 11, 2023 @07:20AM (#37465600)
I think it's quite unfortunate that there isn't a language with

1) Rust's type system or something as expressive 2) C#-level performance 3) GC by default 4) Ecosystem that is as big as Rust

The closest thing seems to be TypeScript (weirdly).

Re:Removing Garbage Collection from the Rust Language (2013) by qalmakka on Monday September 11, 2023 @07:32AM (#37465709)
D (Dlang) checks 3 of those marks. If you like cursed things, Vala isn't that bad...
Re:Removing Garbage Collection from the Rust Language (2013) by chris_nielsen on Monday September 11, 2023 @07:24AM (#37465639)
Not trying to be cheeky, but why not c#? Has pts 2, 3 and 4. For pt 1, what in Rusts type system are you looking for?
Re:Removing Garbage Collection from the Rust Language (2013) by raincole on Monday September 11, 2023 @07:38AM (#37465754)
> Not trying to be cheeky, but why not c#?

C# is my main language. I consider it a very good all-round language.

Rust's type system has some advantages over C# tho, for example Sum Type, Option (C# has ? but it was added later so you need to be careful when interacting with old code, kinda like TypeScript <-> JavaScript to a lesser extent), exhaustive enum, etc.

Another thing I don't like about C# is the runtime startup time which prevents me from using it for command line tools (Yes I prefer static typed languages even for "scripting"). I think Go has proven that you can have both GC and extremely fast startup time.

Re:Removing Garbage Collection from the Rust Language (2013) by digibeet on Monday September 11, 2023 @07:49AM (#37465858)
Runtime startup might be a fixed issue soon for smaller CLI programs. Correct me if I'm wrong, but I believe they are working on (and it is already available with a compiler option) to compile your C# program ahead of time (C# AOT).
Re:Removing Garbage Collection from the Rust Language (2013) by MrBuddyCasino on Monday September 11, 2023 @07:56AM (#37465908)
Tried Kotlin native?

- sum types via sealed classes (not great, admittedly)

- enum "when" expressions are exhaustive

- option type via built-in nullable types (honestly the superior solution)

Re:Removing Garbage Collection from the Rust Language (2013) by neonsunset on Monday September 11, 2023 @09:33AM (#37467017)
Could you try a few sample scenarios for a CLI tool written in C# with the following publish options?

JIT:

    dotnet publish -c release -o publish -p:PublishSingleFile=true -p:PublishTrimmed=true
AOT:

    dotnet publish -c release -o publish -p:PublishAot=true
Either one has really good startup time (below ~100ms and 20-30ms respectively depending on what you do), compact binary size and require no external dependencies. Just like in Go except without all shortcomings of Go :)

p.s.: AOT on macOS requires .NET 8 preview (will be released in November)

Re:Removing Garbage Collection from the Rust Language (2013) by raincole on Monday September 11, 2023 @10:22AM (#37467721)
Interesting, I remembered I've tried something similar to your JIT example but maybe my memory is playing tricks on me. I'll try these again later
Re:Removing Garbage Collection from the Rust Language (2013) by cb321 on Monday September 11, 2023 @03:32PM (#37472525)
20 milliseconds? On my 7 year old Linux box, this little Nim program https://github.com/c-blake/bu/blob/main/wsz.nim runs to completion in 275 microseconds when fully statically linked with musl libc on Linux. That's with a stripped environment (with `env -i`). It takes more like 318 microseconds with my usual 54 environment variables. The program only does about 17 system calls, though.

Additionally, https://github.com/c-blake/cligen makes decent CLI tools a real breeze. If you like some of Go's qualities but the language seems too limited, you might like Nim: https://nim-lang.org. I generally find getting good performance much less of a challenge with Nim, but Nim is undeniably less well known with a smaller ecosystem and less corporate backing.

Re:Removing Garbage Collection from the Rust Language (2013) by neonsunset on Monday September 11, 2023 @03:53PM (#37472733)
20ms as measured with `time` on Fish shell on macOS. Let's be real, comparing versus Nim here is the same as comparing with C - both are a much lower level languages and don't do as much work on startup (threadpool, GC, etc.) and, for the reference, 60fps is 16.6ms per frame. The difference is unlikely to be noticeable. And this isn't measuring program execution time but back to back console receiving a command to launch a binary, OS doing so, binary starting, doing useful work (displaying hint that the command was not in the correct format) and only then exiting.
Re:Removing Garbage Collection from the Rust Language (2013) by cb321 on Monday September 11, 2023 @04:18PM (#37473068)
I agree this particular C# being >160x slower may not matter much for one-off commands keyed-in by and watched by humans, but that may not be all that matters. E.g., some people might `find . -print | xargs -n1 cmd`.

EDIT: Also, it's misleading to bundle Nim with C and its many & storied footguns. While "low-level" is somewhat subjective and you can opt-in to go as low as C (if you so desire), most Nim code is as high-level as Python or C#, and the language has very high-level capabilities. E.g., Nim has user-defined operators like Julia. Want to add `=~` or `~` for regex pattern matching? No problemo. In that aspect, Nim is arguably higher-level than C#.

Re:Removing Garbage Collection from the Rust Language (2013) by ReleaseCandidat on Monday September 11, 2023 @10:15AM (#37467609)
> C# is my main language.

Then the answer is F#. OCaml has everything except the big ecosystem. Haskell has a way bigger Ecosystem than OCaml, but is still not comparable to Rust.

Re:Removing Garbage Collection from the Rust Language (2013) by kirse on Monday September 11, 2023 @03:45PM (#37472624)
Rust's type system has some advantages over C#

Pick up some F# then. Both can interop, I've built many things in a combo of the two languages, plus it'll make you a better C# developer and your type system power greatly increases. Be careful though you might not want to go back to C#.

Re:Removing Garbage Collection from the Rust Language (2013) by tazjin on Monday September 11, 2023 @07:29AM (#37465687)
I don't know C#, so maybe it has these, but it's unlikely:

- absence of null pointers

- proper sum types which can be statically checked for exhaustiveness

- statically controlled mutability (yes, borrow-checking is still useful if you have a GC!)

Also no exceptions, but that's not a type system feature.

Re:Removing Garbage Collection from the Rust Language (2013) by seabrookmx on Monday September 11, 2023 @03:23PM (#37472409)
C# calls the first one "nullable reference types." When that build option is enabled, all types are non-nullable by default, and you can make them optionally nullable by declaring them like "MyClass? cls = null;"

The compiler will ensure you check for null before de-referencing a nullable type.

Re:Removing Garbage Collection from the Rust Language (2013) by tazjin on Monday September 11, 2023 @05:57PM (#37474262)
How does this interact with third-party dependencies you use? In my experience, most gradual typing things break down at that boundary.
Re:Removing Garbage Collection from the Rust Language (2013) by seabrookmx on Tuesday September 12, 2023 @12:14PM (#37483511)
This isn't gradual typing? If libraries are not compiled with the compiler option, then all their reference types will be deemed nullable and I need to check for null before dereferencing. I can't do something like "GetItem().Name" if "GetItem()" returns a reference type like I could in Java, GoLang, JS, etc. If that library did use the flag and was provably non-nullable, then I could.
Re:Removing Garbage Collection from the Rust Language (2013) by John23832 on Monday September 11, 2023 @07:40AM (#37465775)
Then what about F#?
Re:Removing Garbage Collection from the Rust Language (2013) by jen20 on Monday September 11, 2023 @07:29AM (#37465682)
Sum types, which can only be approximated in C# via records, and no exceptions, which is even a problem for F#.
Re:Removing Garbage Collection from the Rust Language (2013) by madeofpalk on Monday September 11, 2023 @11:02AM (#37468317)
C#'s type system is nowhere near as expressive. Lack of sum types/discriminated unions and pattern matching/type refinement.
Re:Removing Garbage Collection from the Rust Language (2013) by indeyets on Monday September 11, 2023 @07:25AM (#37465641)
F# probably?
Re:Removing Garbage Collection from the Rust Language (2013) by lysecret on Monday September 11, 2023 @07:29AM (#37465686)
Yes wanted to comment that as well.
Re:Removing Garbage Collection from the Rust Language (2013) by skrebbel on Monday September 11, 2023 @08:20AM (#37466144)
Yeah GP’s points 1 through 4 seem like they could be on an F# pitch deck. It’s an ML with full access to the .net ecosystem and the .net VM’s speed and stability.
Re:Removing Garbage Collection from the Rust Language (2013) by mxz3000 on Monday September 11, 2023 @08:52AM (#37466490)
we have a massive mixed c# and f# codebase at work.

F# is not magical. Yes it's an ML, but frankly, C# is better in every way, to the point we're slowly moving away from F# entirely.

The main reason is perf, it's really easy to shoot yourself in the foot with performance in c# (e.g. huge allocations, accidentally evaluating seqs twice, etc). Also IDE support for F# sucks when you get to the hundreds of project solutions like we have.

For side projects, sure use F#. For everything else, stick with C#.

Re:Removing Garbage Collection from the Rust Language (2013) by ThomasTJdev on Monday September 11, 2023 @07:32AM (#37465714)
Nim-lang fits 1, 2 and 3! And in a couple of years the ecosystem is up to level ;)
Re:Removing Garbage Collection from the Rust Language (2013) by faewjpofiajwifa on Monday September 11, 2023 @08:58AM (#37466573)
Nim doesn't have sum types and pattern matching, which are an essential part of an expressive type system. It also appears to have `nil` be a valid value for most types by default?
Re:Removing Garbage Collection from the Rust Language (2013) by cb321 on Monday September 11, 2023 @12:58PM (#37470124)
This comment is misleading &| misinformed.

Sum types are built-in [1] for formal parameters. `nil` is only for `ref|ptr` types. In much code you can just use stack allocated value types and there is neither GC concern nor nil concern, but there is also a mode to help: https://nim-lang.github.io/Nim/manual_experimental_strictnot...

Nim has an easy-ish to use Lisp-like syntax macro system where you just receive & process an AST. So, to do the rest you can make libraries adding the feature without relying upon upstream compiler: such as https://github.com/beef331/sumtypes for variables with sum types or pattern matching libs like https://andreaferretti.github.io/patty/ | https://github.com/alehander92/gara.

Re:Removing Garbage Collection from the Rust Language (2013) by sa-code on Monday September 11, 2023 @07:28AM (#37465674)
Mojo could potentially fill this gap in a year. They still have a long way to go, but they're working on traits and sum types right now
Re:Removing Garbage Collection from the Rust Language (2013) by nvm0n2 on Monday September 11, 2023 @07:36AM (#37465738)
Isn't Rust's type system mostly about not having GC? What specific type system features are you looking for outside of borrow checking? Macros?

Probably the closest would be Kotlin. It has the huge JVM ecosystem, it uses GC, programs run fast, they can be compiled to native binaries using at least two different native compilers (kotlin/native and graalvm). The type system is fairly expressive, albeit not quite as much as TypeScript. It makes up for it with just being a much cleaner and more logical language in general, as it didn't inherit much historical baggage.

There's also a compiler plugin API which is maybe the closest equivalent of macros. It's not really documented or stable in Kotlin 1.x, they're fixing that for Kotlin 2, but there are already a bunch of useful plugins that add various features via compile-time generation and reflection.

Re:Removing Garbage Collection from the Rust Language (2013) by masklinn on Monday September 11, 2023 @08:07AM (#37466037)
> Isn't Rust's type system mostly about not having GC? What specific type system features are you looking for outside of borrow checking?

Sun types, affine types, traits.

Re:Removing Garbage Collection from the Rust Language (2013) by veber-alex on Monday September 11, 2023 @08:17AM (#37466115)
> Isn't Rust's type system mostly about not having GC? What specific type system features are you looking for outside of borrow checking? Macros?

1. ADTs with exhaustive pattern matching

2. No exceptions

3. Zero cost generics

4. Traits

5. No nulls

6. No inheritance

Re:Removing Garbage Collection from the Rust Language (2013) by fweimer on Monday September 11, 2023 @08:33AM (#37466272)
Rust has exceptions. They are used throughout the standard libraries to report some errors, and as far as I can tell, they are deeply ingrained into the default testing framework.

As a rule of thumb, languages that loudly claim not to have exceptions actually use them in some way (see POSIX C, Perl, Go).

Re:Removing Garbage Collection from the Rust Language (2013) by TwentyPosts on Monday September 11, 2023 @09:04AM (#37466645)
Saying that Rust "has exceptions" is dishonest. What matters isn't whether they technically exist, but if and how they're used.

In idiomatically written Rust you will never obtain an exception/panic (unless there is a bug), and exceptions are not used for control flow. This is not the case in Java or C++ or many other languages.

Re:Removing Garbage Collection from the Rust Language (2013) by fweimer on Monday September 18, 2023 @01:32PM (#37559230)
I don't know. It seems fairly common to use std::panic::catch_unwind as a top-level error handler. compiler/rustc_driver_impl/src/lib.rs has this:

    /// The compiler currently unwinds with a special sentinel value to abort
    /// compilation on fatal errors. This function catches that sentinel and turns
    /// the panic into a `Result` instead.
That's clearly using unwinding as a control flow primitive.

There's another example in src/tools/rustfmt/src/lib.rs, in format_snippet, where panics apparently are just suppressed.

I expect application servers for Rust to handle panics in a similar way: abort a specific request, but not terminate the whole process.

Re:Removing Garbage Collection from the Rust Language (2013) by skitter on Monday September 11, 2023 @09:39AM (#37467101)
In JRE terms, Rust doesn't have Exceptions, but it has Errors.
Re:Removing Garbage Collection from the Rust Language (2013) by BenoitP on Monday September 11, 2023 @07:47AM (#37465837)
Java?

* Type system is even accidentally Turing complete

* Very good perf, but language doesn't help by being indirection-friendly. Value types will help a lot.

* SOTA GCs

* Ecosystem big

* Cheap threads now. Don't do async! Just block.

* Structured concurrency soonish

Re:Removing Garbage Collection from the Rust Language (2013) by masklinn on Monday September 11, 2023 @08:02AM (#37465981)
> Type system is even accidentally Turing complete

A turing complete type system is easier to stumble into than to avoid.

That doesn’t mean the type system is expressive. Turing tarpits are turing complete by definition, and nobody would call Thue, Iota, or the average OISC expressive.

Re:Removing Garbage Collection from the Rust Language (2013) by kaba0 on Monday September 11, 2023 @12:20PM (#37469536)
Or if someone really want to play around with types: Scala, especially Scala 3. People can’t even say that it is not nullsafe, as it is.
Re:Removing Garbage Collection from the Rust Language (2013) by Zambyte on Monday September 11, 2023 @01:10PM (#37470289)
I haven't used Scala since 2. Did something change related to null with 3? Can you no longer use null? I know it has the Option type which can be used to safely represent nullable values, but that is (or at least was) in addition to, rather than in replacement of null.
Re:Removing Garbage Collection from the Rust Language (2013) by kaba0 on Monday September 11, 2023 @01:19PM (#37470422)
It has a compiler flag which will remove the null value from most type’s sets, that is a String will never contain null, if you want it to be nullable you have to write `String | None` (or Null? Something like that).
Re:Removing Garbage Collection from the Rust Language (2013) by dcuthbertson on Monday September 11, 2023 @07:49AM (#37465855)
Excuse my ignorance (I have only just started learning Rust), but why is GC by default desirable? If a programming language can tell when a variable goes out of scope, or its lifetime ends and use that information to automatically release allocated memory, then why is having a garbage collector important? Does Rust (as a result of not having GC) put restrictions on the kind of code you can write, or force one to write code in such a way that it's difficult to reason about?
Re:Removing Garbage Collection from the Rust Language (2013) by nu11ptr on Monday September 11, 2023 @07:53AM (#37465886)
Yes, it has a borrow checker which restricts some valid code and occasionally makes you jump through hoops and write in a different style.

Also, a garbage collector that is state of the art (bump allocation, generational, and compacting) is faster overall typically (throughput-wise, but with less predictable latency) than naïve Rc/Arc all over the place (due to usage of "free list" allocator and counter bumps). That isn't to say blisteringly fast Rust isn't possible to write, and in fact it is pretty easy to write by avoiding Rc/Arc except where necessary and using the stack with the borrow checker, but this entails a writing style that is more "low level" and thus takes a bit more thinking.

Re:Removing Garbage Collection from the Rust Language (2013) by HankB99 on Monday September 11, 2023 @08:23AM (#37466188)
IANAGCE (I am not a GC expert.) I thought there were potential costs to using GS.

1. Interrupting the program to sweep, resulting in unpredictable performance.

2. Possibility that a circularly linked group of variables could be impossible to sweep, resulting in memory leaks.

3. Need to check reference counts (along with bounds checks) that degrade performance.

Lack of GC (and bounds checking) are factors that make C/C++ performant and then lead to the kind of bugs that result in programs that don't do what they're supposed to do (and at worst, result in security vulnerabilities.)

I thought a key goal of Rust was to fix these problems without sacrificing performance.

Re:Removing Garbage Collection from the Rust Language (2013) by nu11ptr on Monday September 11, 2023 @08:59AM (#37466581)
> 1. Interrupting the program to sweep, resulting in unpredictable performance.

See my comment regarding "less predictable latency" (although new advances are making for much more predictable latency - see some of the work done in Java GCs for example)

> 2. Possibility that a circularly linked group of variables could be impossible to sweep, resulting in memory leaks.

That is not possible in a precise tracing collector, only in reference counting (Rc/Arc)

> 3. Need to check reference counts (along with bounds checks) that degrade performance.

I think you are referring to reference counting again. Both Rust and C++ have reference counting types as an add on.

State of the art tracing collectors don't collect/check dead objects, they compact live ones, and often don't use reference counting directly. Most objects die young.

> Lack of GC (and bounds checking) are factors that make C/C++ performant and then lead to the kind of bugs that result in programs that don't do what they're supposed to do (and at worst, result in security vulnerabilities.)

Replace "performant" with "predictable performance"

> I thought a key goal of Rust was to fix these problems without sacrificing performance.

Rust, like C/C++, wants you to be able to predict performance and latency and without the baggage of a runtime. Nothing more than trade offs - neither is better or worse. GCs often do perform better with the trade off of latency predictability, but as always it depends on use case as to what is appropriate. Rust likely made the right choice for its domain.

Re:Removing Garbage Collection from the Rust Language (2013) by kaba0 on Monday September 11, 2023 @12:28PM (#37469665)
What kind of GC do you talk about here? (RC is also a GC algorithm, but you seem to mix some of its shortcomings with that of trading GCs).

1) this is generally true, but many part of this can be done concurrently, and if we want to improve latency at the cost of some throughput than there are low-lat GCs that maximize the pause times (it is basically independent from the heap size), so in practice you have similar interrupts as you would from the OS alone.

2) this is not a problem with tracing GCs, only with refcounting (most well known is Python, ObjC and Swift for this perhaps). You can still leak memory everywhere by e.g. storing them in a huge list forever, though, but that is a much rarer and easy to debug bug.

3) this is again only true for RC, and it is the reason why it is slower than tracing GCs, especially when it is multithreaded and the increment/decrement has to be an atomic operation.

Re:Removing Garbage Collection from the Rust Language (2013) by dcuthbertson on Monday September 11, 2023 @08:16AM (#37466109)
Thanks for that explanation! I'm going to have to dive into Rc/Arc [0]. Reference counting built into the standard library is really interesting. Several years ago I wrote a Windows kernel minifilter and reference counting is used a lot by anything that interacts with the filter manager. RC was very helpful to ensure the minifilter didn't leak memory when it was unloaded.

[0]: https://doc.rust-lang.org/std/sync/struct.Arc.html

Re:Removing Garbage Collection from the Rust Language (2013) by mhh__ on Monday September 11, 2023 @08:26AM (#37466210)
With a GC you can basically write whatever you want with reckless abandon and because it's cleaned up at runtime, it's mostly kosher.

Without a GC (i.e. rust), in order to be able to make guarantees about things that it cannot determine at compile time (this is a mathematical impossibility) it restricts the set of programs you can write.

Re:Removing Garbage Collection from the Rust Language (2013) by Someone on Monday September 11, 2023 @11:42AM (#37468953)
> If a programming language can tell when a variable goes out of scope, or its lifetime ends

Whether a variable goes out of scope is trivial in many languages. The problem is with determining whether the lifetime of a value ends.

For example:

    func foo(items, moreItems) {
        b = new bar()
        if coinflip() {
            items.append(b)
        }
        if coinflip() {
            moreItems.append(b)
        }
        // ‘b’ goes out of scope here, but its value
        // may live on inside ‘items’ and/or moreItems
        // and will have to be destroyed when it’s no
        // longer stored in either.
    }
In general, once you allow for dynamic allocation and references that can be copied (so that multiple objects ‘know’ of the allocated object), it can be very difficult to determine exactly when the last reference to such an object ceases to exist.
Re:Removing Garbage Collection from the Rust Language (2013) by dcuthbertson on Wednesday September 13, 2023 @07:08AM (#37495135)
Yes, I agree that determining the lifetime of a value is the hard part. I wrote "... and use that information to automatically release allocated memory, ..." to imply the language got lifetime detection right.
Re:Removing Garbage Collection from the Rust Language (2013) by kaba0 on Monday September 11, 2023 @12:21PM (#37469562)
> Does Rust (as a result of not having GC) put restrictions on the kind of code you can write

Depending on what you mean by kind: yes. That is, Rust does limit your code’s architecture to a subset that is fine for most things, but not everything.

Re:Removing Garbage Collection from the Rust Language (2013) by nu11ptr on Monday September 11, 2023 @07:50AM (#37465861)
I think #1 needs to be expanded to imply what it DOESN'T have as well:

1. No null pointers 2. No exceptions

Re:Removing Garbage Collection from the Rust Language (2013) by AndreasHae on Monday September 11, 2023 @07:55AM (#37465897)
Kotlin ticks all of your boxes, plus you benefit from the vast ecosystem of the JVM.
Re:Removing Garbage Collection from the Rust Language (2013) by richbell on Monday September 11, 2023 @08:00AM (#37465958)
It's unfortunate that Kotlin lacks pattern matching, especially now that Java has it. I can only hope that the release of the new compiler will spur further language features.
Re:Removing Garbage Collection from the Rust Language (2013) by simonkagedal on Monday September 11, 2023 @03:05PM (#37472127)
What kinds of pattern matching that Java now has is Kotlin missing?
Re:Removing Garbage Collection from the Rust Language (2013) by richbell on Monday September 11, 2023 @03:52PM (#37472711)
At the moment Kotlin only has smart casts and exhaustive type checking (e.g., making sure you didn't forget a switch case). It doesn't let you destructure records, add guards to cases, etc.

https://www.infoq.com/articles/pattern-matching-for-switch/

Re:Removing Garbage Collection from the Rust Language (2013) by masklinn on Monday September 11, 2023 @08:05AM (#37466016)
One issue with GC’d language and the associated promiscuity is it’s quite hard to mix with affine or even linear types. Yet those turn out to be quite handy.
Re:Removing Garbage Collection from the Rust Language (2013) by losvedir on Monday September 11, 2023 @08:09AM (#37466053)
Ha, I feel exactly the same. I asked HN about it a year ago[0], and there was some interesting discussion.

[0] https://news.ycombinator.com/item?id=32984776

Re:Removing Garbage Collection from the Rust Language (2013) by fweimer on Monday September 11, 2023 @08:10AM (#37466057)
What do you consider Rust's relevant properties in this context? Traits? Inner object references? Associated types and constants? Compilation tending towards monomorphization?

C++/CLI covers some of these aspects, but I haven't used it and don't know how large the vcpkg ecosystem is.

Re:Removing Garbage Collection from the Rust Language (2013) by EwanToo on Monday September 11, 2023 @08:13AM (#37466083)
I expected someone to write a rust-based scripting language which tightly integrated with rust itself.

In reality, it seems like the python developers and toolchain are embracing rust enough to reduce the benefits to a new alternative.

https://github.com/PyO3/pyo3

Re:Removing Garbage Collection from the Rust Language (2013) by cmrdporcupine on Monday September 11, 2023 @08:29AM (#37466237)
Sounds like you want OCaml (or StandardML but OCaml is more "active")

Since, as I feel it, Rust was/is started as an attempt to bring roughly the ML (Hindley-Milner) type system to the area of `systems` (non-garbage collected) development.

In the early days of Rust I thought of it as type inference & algebraic data types meets C++ (now kiss!). But then the borrow checker stuff went in there and it took a different turn.

And I think you'd be surprised by how large the OCaml package community is.

People who work in Rust would likely find OCaml very familiar after a week or two of hacking.

The other option is Swift, but it's pretty ghetto-ized into the Apple ecosystem.

Re:Removing Garbage Collection from the Rust Language (2013) by rwmj on Monday September 11, 2023 @08:33AM (#37466279)
OCaml or F#?
Re:Removing Garbage Collection from the Rust Language (2013) by loeg on Monday September 11, 2023 @09:54AM (#37467286)
OCaml?
Re:Removing Garbage Collection from the Rust Language (2013) by evntdrvn on Monday September 11, 2023 @10:18AM (#37467663)
F#
Re:Removing Garbage Collection from the Rust Language (2013) by corethree on Monday September 11, 2023 @10:38AM (#37467947)
Haskell has a better type system. In fact rusts type system is derived from ML languages ...

Tons of languages have better type systems.

Re:Removing Garbage Collection from the Rust Language (2013) by thelittlenag on Monday September 11, 2023 @10:58AM (#37468246)
Scala's type system is about as expressive as it gets in mainstream languages. By virtue of running on the JVM it is GC'd and has Java/C#-like performance. And the ecosystem of Scala implemented libraries is huge.
Re:Removing Garbage Collection from the Rust Language (2013) by wizwit999 on Monday September 11, 2023 @01:05PM (#37470212)
yes something like kotlin + go would be excellent
Re:Removing Garbage Collection from the Rust Language (2013) by manicennui on Monday September 11, 2023 @02:47PM (#37471820)
OCaml probably has everything but 4.
Re:Removing Garbage Collection from the Rust Language (2013) by manicennui on Monday September 11, 2023 @02:47PM (#37471838)
Also just remembered that F# exists, which is probably exactly all of that and runs on the CLR like C#.
Re:Removing Garbage Collection from the Rust Language (2013) by ultimaweapon on Thursday September 14, 2023 @03:21AM (#37505972)
Seems like we are looking for the same thing so I invent a new language to fit my need: https://github.com/ultimaweapon/nitro