If Odin Had Macros
4 days ago
- #Macros
- #Odin
- #Programming
- Odin currently has no plans to add hygienic macros or similar constructs.
- The design of Odin is pragmatic, often providing alternative solutions to problems that might otherwise require macros.
- A hypothetical case for macros in Odin involves push-based iterators, but this is unlikely to be implemented due to potential slippery slope concerns.
- The proposed iterator construct would be imperative and not very composable, aligning with Odin's design philosophy.
- The author emphasizes the importance of maintaining Odin's clear vision and avoiding feature creep.