My 2 cents on this:

On 6/1/15, 7:23 PM, "Brad Chamberlain" <[email protected]> wrote:

>
>Let me peel this one question about config const/var help off separately:
>
>>> For example, given:
>>>
>>>      config var m = 10,
>>>                 n = m;
>>> 
>>> would you prefer ./a.out --help to say:
>>>
>>>      m = 10
>>>      n = m
>>> 
>>> or:
>>>
>>>      m = 10
>>>      n = 10
>>
>> The second is fine.  It's mostly so the user can see what value a
>> variable would have if it's not provided on the command line.
>
>So then the follow-up question is:  Does the second form here suggest to
>you that if I run:
>
>       ./a.out --help
>
>and see:
>
>       m = 10
>       n = 10
>
>that if you run:
>
>       ./a.out --m=100
>
>then n will still be 10?  (because it won't, it'll actually be 100). This
>is what made me ask about the first form.

I think that printing out "m" as the default value for n is the
right approach. Likewise, I think that with

 config var n = computeProblemSize(Locales, m, pi);


printing out "computeProblemSize(Locales, m, pi)" as the default
value for n is the right idea. A prudent programmer would use
a reasonably intuitive function name to make the help text reasonable.

I also think it's clear enough that "computeProblemSize(Locales, m, pi)"
represents a function call and that "10" is an integer, so I don't think
we need to prefix the default value with e.g. "expression:".

Cheers,

-michael


------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to