NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Show HN: Axe - A Systems Programming Language with Builtin Parallelism and No GC (axelang.org)
Panzerschrek 4 days ago [-]
How does it achieve memory safety?

Does it have destructors and RAII?

Does it have type and function templates?

death_eternal 4 days ago [-]
1. It manages memory through deterministic ownership rules and optional arena allocation. Pointers never outlive the allocator that created them, and the compiler performs lifetime checks to prevent use-after-free or double-free errors.

2. Axe does not use C++-style RAII. It employs deterministic cleanup through defer, which allows resources to be released predictably. Also, objects allocated inside an arena are freed as a group when the corresponding arena is destroyed.

3. Not yet. There is an overload system currently:

  overload println(x: generic) {
      string => print_str;
      char*  => println_chrptr;
      i32    => println_i32;
      char   => println_char;
  }(x);
Panzerschrek 3 days ago [-]
How does your compiler manages to perform lifetime check? What if I save a pointer allocated from an arena somewhere, so it outlives it? What if I forgot to free memory via defer?

What about spatial memory safety? Can I read/write outside allowed memory by misusing pointer arithmetic?

What about concurrent access? What if a pointer to some piece of memory is invalidated by some other code?

surajssc1232 4 days ago [-]
How fast is it
death_eternal 4 days ago [-]
Very.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 03:50:45 GMT+0000 (Coordinated Universal Time) with Vercel.