odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.13k stars 551 forks source link

Remove @(require_results) from `arena_init_X` in `virtual.odin` #3861

Closed karl-zylinski closed 4 days ago

karl-zylinski commented 4 days ago

Since you can init a growing arena like this (which is how I usually do it):

arena: vmem.Arena
arena_allocator := vmem.arena_allocator(&arena)

And then use for example a dynamic array to grow that arena without having to handle any allocation error, then you shouldn't be required to handle the initial error of the arena init either.

gingerBill commented 4 days ago

No. I added that on purpose.