Comptime parsing (no allocation)

The Zig parser flattens the AST into arrays using MultiArrayList.

Is this done to avoid compile-time allocations?

I understand that there are also reasons of efficiency but is comptime allocation the main reason since comptime allocations are impossible?

My understanding is that, no, that doesn’t play into it.

If you haven’t watched it, this provides the full justification:

1 Like