Named parameters for code readability

I wish that instead of app.SetRoot(list, true) I could read app.SetRoot(list, fullscreen=true) to avoid switching to documentation and back every time I read new code. Why Go doesn’t support calls with named parameters?

I miss that from Python.

>>> def a(n):
...   print(n)
... 
>>> a(3)
3
>>> a(n=3)
3

My assumption is, to keep the languages grammar simple and unambigous.

Can’t tell you the official reason though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.