Replies: 2 comments
-
Of course, datatypes could also replace enums. So the language could get smaller 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would use it. But what about standard library using options? we are already missing a lot of obvious stl functions and frequently PRs are a pain for user and maintainer. Option is super nice but it means that pretty much any STL extension function that uses a handle (unit, item, destructable especially) should have another override for Option, I think. I don't think this is more harm than good - I think it's nice. Just pointing it out. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just an idea.
Datatypes would be a generalization of tuples. Nonrecursive datatypes would be translated similar to tuples. Recursive datatypes would be translated similar to classes, but with some kind of reference counting to have automated deallocation. This is possible, because immutable datatypes cannot have cycles, and because datatypes will not be castable to int.
Some examples:
Discuss.
Beta Was this translation helpful? Give feedback.
All reactions