News for hackers. Stuff that matters.
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.