std.getopt suggestion

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Sep 29 11:22:47 PDT 2011


On 9/29/11 11:07 AM, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
> news:j629g0$15tr$2 at digitalmars.com...
>> On 9/29/11 10:15 AM, David Nadlinger wrote:
>>> On 9/29/11 6:57 PM, Andrei Alexandrescu wrote:
>>>> On 9/29/11 9:55 AM, Nick Sabalausky wrote:
>>>>> And the rest of us feel the same way about our arguments.
>>>>
>>>> Argumentum ad populum :o).
>>>
>>> Errm . no? Argumentum ad populum would e.g. be »and the rest of us
>>> believe that your arguments are inferior, Andrei, so you are wrong«. :P
>>
>> That is implied. Either way, "the rest of us" attempts to build strength
>> in numbers.
>>
>
> Pardon the confusion. That's not the way I meant it. (Perhaps you're just
> looking for fallacies where there aren't any? j/k ;) )

Well to a good extent.

> What I meant is that:
>
> 1. Both you and the rest of us all feel that we stated our arguments "fairly
> and without appealing to either honor or guilt by association".

I think I can create a case that a recurring argument in favor of 
changing std.getopt was guilt and honor by association. The existing 
design was associated with the generally poor practice of using globals, 
and the proposed design was associated with the generally desirable 
practice of encapsulation.

The fact of the matter is that std.getopt is fine as it is. It is not 
even a singleton object - it's the monostate pattern, for which 
module-level data is perfect.

I argue that you don't want to create several distinct "GetOpter" 
objects and the design should emphatically NOT cater for such cases. 
Since it's only one monomorphic object (and one with only one "method" 
at that), the current design is entirely adequate.

> 2. There is and will always be room for both sides to come up with claims of
> logical fallacies.

Mos def. For what I can tell I was struck by the honor by association. 
Designs without globals are good, therefore the proposal for changing 
std.getopt marks an improvement. This syllogism is fallacious.

> 3. Therefore, pulling out nitpicky meta-argument cards doesn't do either
> side any good - it just ends up a stalemate and draws attention away from
> the more important face-value discussion.

Yah, the banter could go on forever.


Andrei


More information about the Digitalmars-d mailing list