mirror of
https://github.com/enso-org/enso.git
synced 2024-11-23 08:08:34 +03:00
4fc6dcced0
This is a step towards the new language spec. The `type` keyword now means something. So we now have ``` type Maybe a Some (from_some : a) None ``` as a thing one may write. Also `Some` and `None` are not standalone types now – only `Maybe` is. This halfway to static methods – we still allow for things like `Number + Number` for backwards compatibility. It will disappear in the next PR. The concept of a type is now used for method dispatch – with great impact on interpreter code density. Some APIs in the STDLIB may require re-thinking. I take this is going to be up to the libraries team – some choices are not as good with a semantically different language. I've strived to update stdlib with minimal changes – to make sure it still works as it did. It is worth mentioning the conflicting constructor name convention I've used: if `Foo` only has one constructor, previously named `Foo`, we now have: ``` type Foo Foo_Data f1 f2 f3 ``` This is now necessary, because we still don't have proper statics. When they arrive, this can be changed (quite easily, with SED) to use them, and figure out the actual convention then. I have also reworked large parts of the builtins system, because it did not work at all with the new concepts. It also exposes the type variants in SuggestionBuilder, that was the original tiny PR this was based on. PS I'm so sorry for the size of this. No idea how this could have been smaller. It's a breaking language change after all. |
||
---|---|---|
.. | ||
src | ||
package.yaml |