dhh1128 / intent

the intent formal language
https://intentlang.org
2 stars 1 forks source link

support "pull-through" params #90

Open dhh1128 opened 9 years ago

dhh1128 commented 9 years ago

As a shortcut, allow writing code that refers to a param that hasn't been declared. When we see it, automatically add the parameter to the function prototype, using type deduction. If the caller has a variable of the same name, automatically add the param to the args of the invocation. (This behavior might trigger the expansion/accommodation when a user invokes the "grooming" feature of the compiler, which also reacts to other refactorings.)

Note the similarity between this and the idea of "step routines" that get to use all the local variables of their parent routine without declaration, and get to do so permanently.