Andy Armstrong wrote: > On 30 Nov 2007, at 01:32, Michael G Schwern wrote: >> The absurdity of :: becomes more clear because you can apply the same >> arguments to any switch of prove. Let's use ++ instead of '--color' >> because >> its syntactically clean and visually distinct. Or ;; for --merge. > > It's not a switch. It's the end of the switches.
Depends on the way you think about it. Either way the argument still applies. >> Short and clean isn't enough. A control has to suggest it's >> functionality. >> :: doesn't even suggest "pass through the following to the test" even >> after >> its been explained. Because of this, :: is among a class of poorly >> designed >> controls you have to learn by rote. For an example of this, just look >> through >> perlvar and think about how often you still have to refer back to it. > > Would you like your shell to use --pipe instead of '|'? '::' looks to me > like a divider between distinct things - which is what it is. Again, you have context, so of course it looks like what you expect. Also, "dividing distinct things" is not the important thing here. What happens to those things? That the remaining stuff will be passed onto each test is the important thing. :: does not convey that. | makes sense to us because we're trained to it's metaphor. But that metaphor is learned and even then is flawed. | doesn't suggest "take the output of this program and shove it into this other program" UNLESS you already know that it is "piping". Even so, wouldn't - or = have made more sense? "this - that" or "this = that" or even "this -> that" conveys flow better just as < and > do for files. It could also be argued that | is a divider, just like ::, something it's more traditionally used for. Shell can be forgiven for trading terseness for ease of understanding because piping is a powerful feature you're going to use a lot. It warrants a lot of compression. "Pass these switches to the tests" does not. Also, shell is a ubiquitous tool that you're going to use over and over again, so some rote learning is justified. prove is not such a thing. >> The flip-flop case is an unrealistic bit of complexity. Ignore it. > > Was supposed to be a joke making just that point :) Don't quit your day job. ;) Anyhow, I'm with chromatic. We're shoving too much functionality into one interface. -- THIS I COMMAND!