DIP 1019--Named Arguments Lite--Community Review Round 2

Paul Backus snarwin at gmail.com
Sun Jun 9 01:34:50 UTC 2019


On Saturday, 8 June 2019 at 18:05:43 UTC, Jonathan Marler wrote:
> I see value in allowing a caller to omit arguments that have 
> default values, but what is the value in allowing the caller to 
> reorder them?

Without looking at the documentation, which of the following 
calls would fail to compile if argument reordering was forbidden?

spawnProcess("/usr/bin/sort", stdout: outputFile, stdin: 
inputFile);
spawnProcess("/usr/bin/sort", stdin: inputFile, stdout: 
outputFile);

 From a usability perspective, it's completely insane for only one 
of these to work.


More information about the Digitalmars-d mailing list