Runtime types (and many other functional ideas)

Ah, yes, that's pretty close to what I would want from structs.

I guess the idea of struct itself doesn't necessarily need to have a simplified type system to work, a type system would just improve it. But, simply declaring the required fields, like what's done in that issue would certainly take us a long ways there.

Something similar could be said for the variant idea I shared, as that idea is mostly a collection of interconnected structs. It's certainly improved if there was a type-checking syntax, but it could stand alone without it, especially if we still automatically created a Symbol.matcher for the variant and its values.

In general, I think a lot of those ideas are able to stand by themselves to a degree, but definitely work better when designed together.

2 Likes