r/Clojure • • 6d ago

Native regions: a borrow-checked sublanguage inside Clojure

https://yogthos.net/posts/2026-11-28-native-regions.html
28 Upvotes

7 comments sorted by

4

u/beders 6d ago

How do you do it?!? Every week a new great innovation!

7

u/yogthos 6d ago

It's mostly that I've had these ideas rattling around in my head for years, and now I have a vehicle to try them out.

1

u/mac 6d ago

This looks very cool. Is there any kind of LSP support for it yet?

1

u/yogthos 6d ago

The syntax in the regions is just a subset of regular Clojure.

2

u/mac 6d ago

Yeah I get that, but with only a subset allowed, right? Would be handy if the LSP could flag if something not allowed is used. I guess I can come up with a custom linter for clj-kondo.

1

u/yogthos 6d ago

Oh I see what you mean. It does get checked at compile time, but for editor support it would be useful to know if you're using something that isn't legal in the region.

2

u/agumonkey 6d ago

very interesting