r/Clojure • • 1d ago

Native regions: a borrow-checked sublanguage inside Clojure

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

7 comments sorted by

3

u/beders 1d ago

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

6

u/yogthos 1d 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 1d ago

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

1

u/yogthos 1d ago

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

2

u/mac 1d 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 1d 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 1d ago

very interesting