Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can compile a list and discuss some of them
Well the basic common systems languages (I.E. languages for any purpose)
Even things like Forth don’t either, lol.
There are a ton of non-GC languages though, but ‘most’ are of course specialized, like Brainf**k.
Corresponding tweet for this thread:
Share link for this tweet.
Haha, somehow I predicted you’d do something like this from the comment over there. What’s the status of Nim there? I heard it had an option of sorts? Zig maybe? I could be wrong about both.
Oh right, forgot about Zig, it’s GC-less too!
I just found this list:
- Assembly (?)
- C using the MISRA recommendations for embedded automotive systems
- SlideRule (ha ha, very funny…)
new objects, but no automatic collection:
- Ada (originally)
- CeePlusPlus (but see GarbageCollectionInCpp)
- Cobol (prior to OO-COBOL)
- ObjectiveC (but the standard frameworks and runtimes use ReferenceCounting [and optionally GarbageCollection in MacOsx 10.5+ and GnuStep])
- no runtime automatic collection - calls to malloc/free are handled at compile-time
Thi I think most of the more widely used ones are in your post @OvermindDL1
Swift, like Objective-C before it, uses automatic reference counting. So you don’t retain/release yourself. But it’s not garbage-collected. When a retain count goes to 0, the object goes away.
Thanks Jon! Looks like we can call Swift via Elixir/Erlang NIFs too:
The Mac series with the Apple Silicon M1 chip has been released. Weren’t you surprised by the amazing performance of it? I was also. I hoped we can use the wonderful power and Apple’s ecosystem for Elixir programming, so I tried to write Elixir code to call Swift code. This article shows how to call Swift code from Elixir via NIF.