Improving Motoko's programmability

Exposing Candid to/from Blob serialization is not difficult and largely already supported by the compiler, but not exposed. It would be easy to add as a dedicated construct (similar to debug_show) but harder to surface as a library.

I would be very reluctant to add reflection to the language as it breaks all sorts of properties of the language itself and introduces much overhead.

It sounds like you are mostly interested in reflecting on candid interfaces, not all Motoko features. That seems like a more reasonable ask and I can see the applications for that. However, even though canisters currently can expose their textual interfaces using a (hidden) text based query (that’s how icrocks obtains them) we’d probably want something with more structure than just text for a programmatic interface.

1 Like