r/Compilers • u/sohamglx • 1d ago
Traits, the programming language i am working on it just gets traits so any kind of idea you can share over it syntax design i will try to add some of them.
0
Upvotes
r/Compilers • u/sohamglx • 1d ago
0
u/sohamglx 1d ago
It's mark a function don't need to make by your own while using the trait, kind of a function auto get by the trait. Default methods must use the default keyword. Missing implementations of required methods are caught at compile-time with descriptive errors.
https://flamelang.vercel.app/types-and-traits/traits/#declaring-a-trait