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

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Jun 9 20:14:05 UTC 2019


On Sunday, June 9, 2019 12:40:21 PM MDT Paul Backus via Digitalmars-d wrote:
> On Sunday, 9 June 2019 at 11:16:30 UTC, aliak wrote:
> > On Sunday, 9 June 2019 at 01:34:50 UTC, Paul Backus wrote:
> >> 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.
> >
> > Without looking at the documentation, what are the parameters
> > of this function
> >
> > blah(...)
> >
> > ?
>
> My point is not that programmers should be able to write code
> without ever looking at documentation, it's that programmers
> should not have to do mindless busywork that the compiler could
> just as easily do for them.

If programmers don't read the documenation, then they're just begging for
trouble. It shouldn't be necessary to read the documentation every time you
use a function or other symbol from a library, but it's a serious problem if
programmers think that they can get away with never reading the
documentation to see how the code they're using is even supposed to work.

- Jonathan M Davis





More information about the Digitalmars-d mailing list