Hacker News new | ask | show | jobs
by Panzerschrek 19 days ago
Is it memory-safe? Or just as safe as C?
1 comments

Micron is not memory-safe in the sense of Rust, Go or Java, but it is considerably safer than C, and the unsafe parts are explicit and easy to find. It is first and foremost a systems programming language. An optional GC is available at level 5 of the language.
> it is considerably safer than C

to what extent is it safer than C? Does it eliminate safety issues common to C like out of bounds memory access, use-after-free, double-free, race conditions? Or maybe some other kind of safety issue present in C isn't possible in Micron?

> unsafe parts are explicit

Does it have unsafe blocks or something similar?

The book has more about it (chapters 3, 6, 8 and 12).