The feature in OxCaml that more languages should steal

46 points by vaguelytagged


eatonphil

A commenter on Hacker News shared that Swift has a similar @_noAllocation annotation. It's behind an experimental flag. This also led me to notice that Clang has a nonallocating attribute which also behaves similarly, you need to set -Wfunction-effects to get warnings. I've edited the article with this info.

subnut

At best, in Zig (...) you might be able to minimize regression through convention by not passing an allocator to a function. But convention can be ignored.

Is this correct? I thought the whole point of passing allocators as function arguments was so that functions CANNOT allocate on the heap unless it is passed an allocator as one of the arguments?