News for hackers. Stuff that matters.
Re:Nimony: A New Compiler for Nim by jibalt on Tuesday November 17, 2026 @04:09AM (#50529156)
Optionally but not by default ... things have changed a lot:

https://nim-lang.org/docs/mm.html

Re:Nimony: A New Compiler for Nim by vips7L on Tuesday November 17, 2026 @07:47AM (#50530678)
Reference counting by default is GC.
Re:Nimony: A New Compiler for Nim by miguel_martin on Tuesday November 17, 2026 @01:03PM (#50535499)
ref counting is only performed if you use `ref` types, e.g.

  type 
    RefObj = ref object
      foo: string
      bar: int

    ValueObj = object
      foo: string
      bar: int

`RefObj` is ref counted equivalent to a shared_ptr in C++ land. `ValueObj` is simply a struct in C++ land
Re:Nimony: A New Compiler for Nim by flykespice on Tuesday November 17, 2026 @04:16PM (#50538305)
IIRC, ref counting is at least more deterministic than traditional GC because it only runs when you destruct the object (it goes out scope, object gets reassigned whatnot).

In Comparison, traditional GCs like JVM runs on a background thread, it's hard to determine when they run and generally blocks the whole program while collecting (stop-the-world).

So at least they are a little better in that regard?

Re:Nimony: A New Compiler for Nim by vips7L on Tuesday November 17, 2026 @10:56PM (#50541692)
I can’t speak of Nim’s implementation but reference counting can block the whole program as large object graphs have to decrement their counts. But you are right it is more deterministic.

Javas modern GCs also have extremely low pauses. ZGC is effectively pauseless, you’re likely to experience kernel jitter/traps that last longer than a ZGC pause.

Re:Nimony: A New Compiler for Nim by Gesee on Wednesday November 18, 2026 @04:56AM (#50544214)
Refcounting only cause problem when using `ref` counted type, which is also discouraged most of the time when not necessary.
Re:Nimony: A New Compiler for Nim by flykespice on Wednesday November 18, 2026 @07:39AM (#50545583)
Does it suffer from the same trap as Dlang, in that their GC is also optional, but you lose the many of the conveniences from the standard library if you forgo completely with it?
Re:Nimony: A New Compiler for Nim by Gesee on Wednesday November 18, 2026 @07:52AM (#50545719)
GC is optional in the sense "don't use `ref` types and there will be no GC" Value types (`object`) use mutable value semantics and scope based destructors, so there are safe without GC