Re: [PHP-DEV] [VOTE] Named arguments

This is only part of a thread. view whole thread
  110930
July 10, 2020 22:34 cja987@gmail.com (Chuck Adams)
> Then the question becomes, do we rename parameters a lot? I doubt it's a > large problem, and even then the variadics support makes it very easy to > handle in a backwards compatible way. In addition libraries are always open > to declare they don't consider named parameters as part of their API.
Python supports the notion of "keyword-only arguments". If that was supported, and the renamed argument had a default, an API could rename parameters in a backward-compatible manner by introducing a kw-only arg with the same name. One could also consider an aliasing syntax such that more than one keyword could correspond to a named argument. Perhaps using an annotation? --c