DEV Community

Art
Art

Posted on

How Ahimsa Eliminated Our Garbage Collector

A story about how a spiritual principle led to better software design.


We are building a new programming language called SMS (Simple Multiplatform Script).

Yesterday, while testing our first LLVM IR compiler output, we noticed something.

We have no free. No manual memory management. No garbage collector.

Not because we implemented RAII. Not because we built a borrow checker like Rust. Not because we added reference counting explicitly.

Because I never specified it.

"We have no free, no memory management, and no garbage collector – because I never specified it."
— Art, CrowdWare


The Principle Behind It

SMS is built on a single guiding principle:

Ahimsa – a Sanskrit word meaning "do no harm to any living being."

In software, we translate this directly:

  • No program shall crash silently.
  • No UI shall freeze unexpectedly.
  • No runtime shall surprise the developer.

A garbage collector violates Ahimsa. Not because GC is evil – but because GC pauses are unpredictable. Your app freezes for a moment. The user feels it. Something was harmed.

So we asked: what if we simply don't have one?


What Happened Instead

SMS compiles to LLVM IR. LLVM is not naive – it knows how to manage memory. When you don't specify a GC, LLVM defaults to stack allocation and RAII semantics. Memory is freed deterministically when scope ends.

No pause. No stop-the-world. No surprise.

The result:

Runtime GC Pauses Memory Model
Kotlin/JVM ⚠️ yes Garbage Collector
Swift ✅ no ARC
Rust ✅ no Ownership + Borrow Checker
C++ ✅ no RAII (but manual free possible)
SMS ✅ no RAII via LLVM – by omission

Rust achieved this through complexity. A borrow checker. Lifetimes. A steep learning wall.

We achieved it through simplicity. By not adding what wasn't needed.


Native First

SMS sits between two worlds:

JVM (.NET)
 ↑        ↑
Java     C#
Kotlin   F#

     ↕

  [ SMS / Forge ]
  Native First
  LLVM directly
  No GC
  No VM
Enter fullscreen mode Exit fullscreen mode

Java said in 1995: "Write once, run anywhere" – via virtual machine.
We say in 2026: "Write once, run anywhere"natively, via LLVM.

Same goal. No overhead.


The Benchmark

We measured. Same machine, same workload:

Runtime Median p95
SMS Native 3,466 µs 3,502 µs
C# 4,382 µs 4,436 µs
GDScript 258,220 µs 261,709 µs

1.26x faster than C#. 74x faster than GDScript.

And that's before we even talk about worst-case latency – where JVM GC pauses make the gap dramatically larger.

I would say SMS is also faster than its bigger brother Kotlin, at least in the Context of Android and the JavaVM.


What This Means

A principle from ancient India – do no harm – led to a compiler decision that puts SMS in the same performance category as Rust and C++, while keeping the language readable and simple.

We didn't plan this. We didn't engineer it.

We just asked: what causes harm? And then we didn't build it. On a subconscious level.


Where We Are

SMS is young. The first LLVM compiler was written yesterday.
Forge 4D – the application framework built on SMS and SML – is in early alpha.

We are looking for:

  • C++ reviewers who want to look at the compiler internals
  • Developers curious about what Native First actually means in practice
  • Anyone who has ever wanted to throw their JVM out the window 😄

The project lives on Codeberg: CrowdWare/Forge

Forge is free for humans. Always.

Built with love, coffee, and a stubborn focus on simplicity.


Art is the founder of CrowdWare and a tantric monk. He thinks in systems, builds in SMS, and lets the universe handle the rest.

Top comments (0)