I can see it’s a useful function, if you are using both managed and unmanaged array lists. For myself, I would just have a plain allocator param since I don’t use managed lists. Also note that the managed list will be removed from std, as far as I know.
IMO the resize method isn’t needed at all (it’s trivial), but since it does exist I think it makes sense to leave the additional items uninitialized. There are lots of ways that one could initialize the new items, so this allows for that without the penalty of double-initialization.
In languages that heavily use closures, a closure could be passed to do the initialization, but Zig is not such a language. Another approach more appropriate for Zig is to return the slice of uninitialized items, to make it easy to initialize in various ways.
the real problem with resize in the std lib is that there is no easy way to get the new elements which are now undefined. If there were, I’d just do that.