Dashboard
Signal #142412POSITIVE

Show HN: Jik – a language with region-based memory management that compiles to C

85

Hi HN,I've been working on Jik, a statically typed programming language with region-based memory management, which compiles to C.The purpose of Jik is to try to answer the following question:Is there a region-based memory management model which is simple enough to implement and ergonomic enough for everyday use?Here is a short example to give you a brief idea: struct Person: name: String age: int end func make_person(name, age, r: Region) -> Person: // trailing [r] means "allocate in region r" return Person{name = name, age = age}[r] end func main(): // _ is reserved for the function's local region p := make_person("Ana", 30, _) println(p.name) end More on the memory model can be found in the docs: https://github.com/jik-lang/jik/blob/main/docs/overview/08-m...Jik is in alpha, but it is usable enough to try out: https://codespaces.new/jik-lang/try-jik?quickstart=1Any feedback, especially on Jik's memory management concept, is highly appreciated! Comments URL: https://news.ycombinator.c...

HackerNews AI Launchesabout 3 hours ago
Read Full Article

Explore with AI-Powered Tools

View All Signals

Explore more AI intelligence

Want to discover more AI signals like this?

Explore Steek
Show HN: Jik – a language with region-based memory management that compiles to C | Steek AI Signal | Steek