polterguy / lizzie

A script language for .Net and the CLR
https://ainiro.io/
MIT License
190 stars 27 forks source link

Minor coding improvement in Function() #30

Closed SapphireBrand closed 5 years ago

SapphireBrand commented 5 years ago

Around line 272 is a loop for (var ix = 0; ix < arguments2.Count && ix < args.Count; ix++). But we know that arguments2.Count is <= args.Count because of the validation on line 261.

So the loop control can be simplified to for (var ix = 0; ix < arguments2.Count; ix++).

I would change the naming of arguments2 and args to better reflect their roles. Something like formalParameters and functionCallArguments?

polterguy commented 5 years ago

Done! I chose invocationArguments and formallyDeclaredArguments though.