|
|
|
|
|
by throwaway17_17
1088 days ago
|
|
The most frequently given reason is that a core principle for Zig is ‘No implicit control flow’ or just the more general ‘Explicit is always better’. RAII, both for constructors and destructors are inherently implicit control flow constructs, also they usually involve access to allocation primitives, which Zig also rejects when implicit. You can disagree with the language principles if that is one’s position. However, the ‘resistance’ to RAII is a clear effect of those principles. |
|