Order of evaluation for named arguments

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Mar 31 01:21:35 UTC 2025


On Sunday, March 30, 2025 11:45:07 AM MDT Walter Bright via Digitalmars-d wrote:
> In principle I agree with you, but on a pragmatic note this will silently break
> existing code.

It might, but most folks don't even realize that named arguments are a thing
in D, and most code doesn't rely on the order of evaluation of the arguments
to a function. As such, I would expect that the amount of code that would
actually break would be extremely small (and possibly zero).

Most bug fixes risk silently breaking some piece of code that accidentally
relied on the broken behavior, and I think this is a case where the odds of
it actually causing problems are sufficiently low that it's worth just
making it all consistent - and the sooner we do it, the less likely it is to
break any code.

- Jonathan M Davis





More information about the Digitalmars-d mailing list