Replies: 5 comments 7 replies
-
It's a good idea untill we need to change some builtin a little bit in a way that can't be expressed in YAML |
Beta Was this translation helpful? Give feedback.
-
im not sure i feel comfortable with this sort of change. as of right now builtins are maintaining macros is a pain in the ass, especially big and complex ones like this |
Beta Was this translation helpful? Give feedback.
-
why not an alias (or other keyword) definition : |
Beta Was this translation helpful? Give feedback.
-
It may be less lines of code to maintain, which is also unlikely, but the complexity increases by one more indirection. Writing and maintaining abstract layers is more complex than simple trait implementations. |
Beta Was this translation helpful? Give feedback.
-
Looking at Associated Constants Examples, it seems like we may be able to make a trait for builtins that will only require specifying some constants, and the rest of the implementation will be provided automatically. Plus, things that need something extra may override the default implementation. This won't generate docs, though |
Beta Was this translation helpful? Give feedback.
-
Taking as example #311
An idea is to write builtin in this way:
So to compile will read the definitions files and will add in the engine.
It will be less code to maintain and it is more easy to generate documentation and implement them.
Beta Was this translation helpful? Give feedback.
All reactions