Truly implicit arguments?

I was recently reviewing Cairo code and found the implicit arguments in every function definition really distracting.

Are there plans to make these “truly” implicit at the function definition? And have the compiler infer them. Is this technically possible?

The recent move to make builtins implicit was great for developer experience and I think this one would have an even greater impact.


Huge +1. I’d say most of the inconveniences with Cairo today are around boilerplate code and this is by far the biggest boilerplate we have today. Codebases will likely shrink by at least 25% (ymmv).


Totally agree has been a huge distraction. Reading chunks of variable names in function definitions but not using them in functions is very distracting.

@martriay What is ymmv btw?


I also agree with this, now that storage is behind a syscall_ptr it looks like 90% of functions need the same 3 builtins (syscall_ptr, pedersen_ptr and range_check_ptr).


Hey hey

We agree! It is on our features list. Specifically:

  • Removing implicit arguments from functions declarations
  • Better handling revoked references with IFs etc (you still need them as soon as you have an if, for implicit arguments amongst other things)

I don’t have a timeline for that though, as you know, currently we are focusing on performance issues; we will update as soon as this is shipped.