Not sure if there are any metrics on this, but I was wondering: what functions do you use the most from ic_cdk
in your projects?
I’m guessing the following comes often in your codebase:
caller()
id()
call()
time()
Any other functions?
Asking for a friend who’s building something that’s not that secret anymore 
2 Likes
Thanks a lot for the feedback, Severin! It confirms time()
is the next one I should tackle.
Funny enough, I use id()
quite a bit since it basically acts like admin privileges in my serverless functions.
If any other functions come to mind, feel free to share!
1 Like
In my code, there’s no doubt that caller()
is used the most, since it’s heavily involved in access control.
In places where there’s a lot of state management involved, I find trap()
more convenient than restoring the state step by step 
1 Like
Absolutely, caller()
will definitely be useful when I extend support to allow developers to write their own endpoints (which they can already do in Rust, but not in the first iteration of the TypeScript support I’m currently wrapping up).
I also use trap()
for convenience, and I’ll need to add it in the same context — good point. 
Thanks for the feedback!
1 Like