|
|
|
|
|
by _0w8t
1166 days ago
|
|
Zig approach essentially parametrizes instances of containers on the instance of the allocator. To properly support that in the type system one needs dependent types. In theory that can be done, but the consequences for the compilation time will be extreme as the compiler becomes essentially a generic theorem prover. Plus the noise from the proofs in the sources will be much bigger than that of type parameters. |
|
In fact, it would probably be acceptable to insist on keeping the scope of parameterization limited to the linearly determinable set of values and operations on those values.