-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split out match interface #159
Comments
Actually, the compiler was made in the days I didn't fully aware of Julia latency issues, leading to very frequent (and redundant) runtime compilation. MLStyle.jl heavily uses high order functions and the so-called tagless final patterns. Such way of abstraction in Julia causes extensive compilation due to the lack of typed functions (like those of FunctionWrappers.jl).
I agree things can be improved a lot with type stable ADTs. Also, the pattern compilation engine (i,e, AbstractPatterns) can be redesigned to avoid tagless final patterns. Tagless final is theoretically identical to ADT approach if polymorphic functions and data types used in the engine will not get extended. I prefer the following roadmap instead of splitting out a utility package:
|
It has been quite a long time since the introduction of MLStyle.jl. During years, some features are used but some are not, which suggests that the new pattern compiler does not need to be as powerful as the current one. It can be fairly simple, with support of only the "practical" functionalities. I have some young PL friends and I'll try to hire some of them for MLStyle v0.5. |
It would be nice to have a package with |
I think we should consider a split match interface so that in the future we can eventually bootstrap the match macro, currently, this is also preventing me from removing MLStyle dependency at runtime, this is basically exporting an interface package with generic functions like
pattern_uncall
that can be overloaded in another package, etc.then a utility package needs to be split out to provide things like
MLStyle.AbstractPatterns.NoncachablePre
etc.Also I'm not sure why MLStyle takes quite a long time to load for a not-so-large codebase, perhaps we should re-implement the ADT in AbstractPatterns with the type-stable ADT provided by Expronicon.
The text was updated successfully, but these errors were encountered: