inkwell
inkwell copied to clipboard
Higher Kinded Types?
Is your feature request related to a problem? Please describe.
trying to make a functional language so I need higher kinded types (eg int32 -> int32 -> int32
) thus I need to create a function that has a return type of another function. as well why can't I simply create pointer and/or function off an AnyTypeEnum
?
Describe the solution you'd like
Allow chaining of the fn_type
method on AnyTypeEnum
. simply implemented as a match on self that would allow
Describe possible drawbacks to your solution I don't think it can hinder much?
Describe alternatives you've considered not really any work arounds i've found.
Just realized i need to make it return a function pointer in order to pull it off. Still would like to see the latter part of the suggestion.
I'm not sure that it makes sense to add to AnyTimeEnum since not all types (now or in the future) may be valid. But perhaps we could make the method fallible or something. hmm