Hi Here’s the wishlist/suggestions that I brought to today’s Motoko Developer Working group.
1- Different type of types? Maybe having: 1. Types for data structures, 2. Types for interfaces, 3. Type for operatives.
2- More info in the function MSG. We now have Caller, it could be great to know if the call came from a canister, from an http request or from an API call. In case it’s an http request, know the URL and in case it’s an API call, know the IP address.
3- Generally available types. Principal is generally available as a type, but I would love to make Address/AccountID for ex, generally available to use without importing it.
4- Get candid automatically, so there’s no need to have a .did to reference in your code. If I need to code a canister, just being able to create the actor without the IDL?
5- I would love to know, without maintaining my own mapping, which public variables are there in the code. I’m not too savvy on this topic but I think Game Engines use reflection to allow User Interfaces to populate with data available in runtime.
6- Suggestions or security layers to reduce upgrade risks. How do we prevent the lost of data during upgrades, language level. Maybe having more docs on how types design can break your type consistency, or if you set an attribute as optional you have less risks on upgrading errors, etc. It’s not just documentation, but how can we make less possible for devs to lose data. I see that for now it’s super risky to have an app on the IC. It feels risky and it’s scary…but it should be even safer and less riskier than web2. For Rust I guess it’s ok but Motoko is looking to be a “for everyone” language, right?
7- I think we need better and simpler ways to orchestrate and interop between canisters…If I want to have a microservices architecture with a lot of services for just one app, things get messy really quickly. I think there should be better ways to tie canisters.
8- Being able to have extensible actors. This is just for having the ability to create multiple files with public functions. The idea is to be able to modularized my public functions, the developer doesn’t necessarily want them in the same file.
9- It’s a bit problematic that I cannot manipulate and/or declare my stable data structures outside my actor file, that could be fixed with the extensible actors thing that I mentioned previously.
10- I would love to have “prefunctions”. E.g. Have my authorization module to be executed before certain functions. It’s not only allowing me to have a function that always executes before every function but also that lets me choose what to execute when each function is called. That could fixed the repetition of authorization code, canisterIDVsPrincipalID validation, in a future, maybe IP address validation, etc.
11- If the code itself could show an approximate of cycle consumption and/or time spent for a function, that could be awesome. Not sure if possible but this is my Christmas list so yep…that would be great.