intersystems-community / ideas-and-innovations

InterSystems Developer Community Ideas and Requests for Innovative Solutions with InterSystems IRIS
MIT License
5 stars 0 forks source link

Named arguments/parameters #29

Open hermanslagman opened 5 years ago

hermanslagman commented 5 years ago

There seems to be some discussion about the 'arguments' versus 'parameters' as the input for methods or procedures. I use the name arguments. COS/CDL should support the use of names arguments (like Python), so:

ClassMethod WhoAmI(Age as %Integer="", Country as %String="", Gender as MySpace.Gender="")

Could being called by ##class(Example).WhoAmI(Country="NL") Instead of ##class(Example).WhoAmI(,"NL")

The COS/CDL compiler should enforce the right names, e.g. Eyes="Blue" would trigger a compiler error.

Beside not having to use ,,,,"yes", it's more declarative: Print="yes"

evshvarov commented 2 years ago

Could you please reintroduce the idea on the InterSystems Ideas portal? Use InterSystems SSO to sign in.