inkwell icon indicating copy to clipboard operation
inkwell copied to clipboard

Higher Kinded Types?

Open JCBurnside opened this issue 2 years ago • 2 comments

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.

JCBurnside avatar Jun 27 '22 19:06 JCBurnside

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.

JCBurnside avatar Jun 27 '22 20:06 JCBurnside

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

TheDan64 avatar Jul 16 '22 15:07 TheDan64