odin-lang / Odin

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

Clarify when the arena in base:runtime should be used #3779

Closed karl-zylinski closed 2 weeks ago

karl-zylinski commented 2 weeks ago

This PR clarifies that the arena in base:runtime shouldn't be used for anything but the default temp allocator. This is done by:

This should avoid some confusion where people end up using the Arena inbase:runtime because they thought it was the 'default arena', as the old file name default_allocators_arena.odin might have lured them into believing.

karl-zylinski commented 2 weeks ago

I guess if one wanted to take this further and make it even clearer, then we could also rename Arena in base:runtime to Temp_Arena etc. I can do that if it's seen as a good idea.

That would lessen the "jump to symbol" confusion with there being 3 different Arena in base and core.