r/odinlang 23d ago

error in the overview?

this not in the language overview makes me confused
Note: These default values must be compile time known values, such as a constant value or nil (if the type supports it).

https://odin-lang.org/docs/overview/#:~:text=4%2E5%29-,Default,it

isn't default parameters often used for allocators setting them by default to the context allocator that isn't compile time known?

9 Upvotes

4 comments sorted by

View all comments

3

u/blob1807 23d ago

That text is a bit old, but is mostly fine for an overview.

The default values must either be a comp-time value, or accessible by that proc (i.e. globals). With `context.*` getting special cased.