by Panzerschrek · 1y ago · 0 comments
Does it have destructors and RAII?
Does it have type and function templates?
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);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?