5 ms·
I would assume this stems from Zig’s commitment to ‘No Hidden Control Flow’. By nature, syntactic sugar for reference counting will involve the calling of funct
by throwaway17_17 3y ago
I would assume this stems from Zig’s commitment to ‘No Hidden Control Flow’. By nature, syntactic sugar for reference counting will involve the calling of functions inside the code the sugar is standing in for. This would then require adding the RC constructs as language primitives and hard code their implementation into the language. As such, I don’t think adding RC and a ‘painless’ syntax to use it is likely to be a feature Zig picks up or settles on for memory management in the language.
This seems to be a hard line for Andrew, I don’t think he is unable to consider adding primitives to Zig, but the sense I get from his recorded presentations is that the primitive collection in Zig currently is very unlikely to expand as Zig moves to 1.0.
NOTE — I am not affiliated with Zig and don’t know how the process of language design works for them outside of A. Kelly’s being assumed to be BDFL and having final say.