std.getopt suggestion

Nick Sabalausky a at a.a
Thu Sep 29 09:55:38 PDT 2011


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
news:j626io$10pu$1 at digitalmars.com...
> On 9/29/11 9:25 AM, Nick Sabalausky wrote:
>> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
>> news:j623kg$rfi$1 at digitalmars.com...
>>>
>>> The proposed change adds net negative value. It forces people to create 
>>> an
>>> object in order to call a simple function
>>>
>>
>> Not really:
>>
>> OptGetter.optGet(...);
>>
>> Even that "OptGetter." can be eliminated (parhaps after the existing 
>> opget
>> is deprecated).
>
> Why do you need it if all you want is to get rid of it?
>

You're the one that's pushing to keep the user syntax for the simple cases 
as much the same as possible. I'm demonstrating how that can be reasonably 
accomodated within the proposal.

The idea is to make complex cases less error-prone without overcomplicating 
the simple cases. You seem to be dismissive of the more complex cases. Why? 
Just because they're less common (but not to the point of being unrealistic) 
doesn't mean such scenarios should be dismissed and/or kept error-prone if 
it can be reasonably avoided. And Jonathan's suggestion sounds like it falls 
into that "reasonably" category to me, even if we might want some minor 
details of it tweaked.

>> And for cases that need non-default settings, setting values on a struct 
>> is
>> no harder than setting a few variables.
>>
>> You accuse people of using unsubstantiated "good" and "better", but then 
>> you
>> dismiss and hand-wave-away half the stated benefits. Can we at least stop
>> with the meta-arguments? That kind of debate inevitably ends up becoming
>> hippocritical.
>
> Not criticizing any hippopotamus here :o).

Heh. Yea, well, I never claimed I could spell worth a damn ;)  Especially 
without my minimum caffeine quota...

> I think I stated my argument fairly and without appealing to either honor 
> or guilt by association.
>

And the rest of us feel the same way about our arguments. But pretty much 
any argument can be nitpicked apart by overapplying the rules of proper 
debating. You may not feel you were doing that, but I feel that you were, 
even if it wasn't intentional (as I'm sure it wasn't).




More information about the Digitalmars-d mailing list