Closed Stonygeist123 closed 1 year ago
@Stonygeist123 Thanks for the suggestion; I will look into it. By AST you mean algebraic vs. abstract data types?
Should be able to provide TypeScript-level support by extending the alias
keyword to include type unions.
@objeck Both, algebraic and abstract data types would be neat. Though I am not sure if a class like in C++ would be better than a TypeScript-like union syntax.
Here's an interface-based solution. I do not think I need to add anything new to the language.
Ok, looks nice.
Adding Rust-like ADTs and pattern matching would be pretty useful since it makes coding more elegant and easier