-
Notifications
You must be signed in to change notification settings - Fork 105
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
LANG-28: flesh out a concept for reflected type parameters #3467
Conversation
which are functions (when needed)
As of 14051b1 the following abilities are present
Currently all the administrative glue is manually written, but I expect that the compiler can fill this in by straightforward metaprogramming based on the call-site's known type structure resp. the passed-in |
In today's ICP.Lab Motoko office hours the following simplified context came up: func ws_send<to_candid A>(data : A) would allow using func ws_receive<from_candid A>(blob : Blob) : A { let ?(a : A) = from_candid(blob) else trap(); a } would work for deserialising. Stacking would make sense too |
Just doing some repo cleanup for better focussing on active work: |
Researching a type reflection mechanism. JIRA: https://dfinity.atlassian.net/browse/LANG-28.
I expect that deconstruction will be rather easy, but construction will be very tricky (needs CPS?).