On Oct 3, 2010, at 6:23 PM, Jed Brown wrote:

> We agree about flexibility, I'm just not convinced that extra arguments is 
> necessarily more user-friendly than different functions, though I fully 
> understand having a single man page being desirable.

   Ok, I'll buy that. One reason I like the one function with additional 
argument is that by having to see and type in that argument users immediately 
see that other variants exist. Having other functions means they have to read 
the docs more carefully to be aware that other variants exist.

   NC() and WithArray() really got me. I mean how could anyone instinctively 
know what the difference between NC() and WithArray() was? To people it would 
be gibberish. 

> 
> Freeing the array is being dishonest about (casting away) const.

   With a language with overloading we could be both technically honest and 
practically host. Without I prefer to be practically honest instead of 
technically honest.

   Barry


> 
> Jed
> 
> 
>> On Oct 4, 2010 1:17 AM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
>> 
>> 
>> On Oct 3, 2010, at 6:12 PM, Jed Brown wrote:
>> 
>> > Here at least PETSC_COPY_MODE doesn't really make s...
>> 
>>   I don't understand this sentence.  It is not my intention that the single 
>> function has more flexibility then having the three functions, just the same 
>> flexibility in a more user friendly way.
>> 
>> > Also, separate functions can actually be const-correct. As I see it, the 
>> > only downside of separat...
>> 
>>   Well, what does it mean to be const correct in the NC and WithArray case? 
>> The public interface with it declared as const is correct because the IS is 
>> not allowed to change those values ever.  So I think the current const is 
>> correct.
>> 
>>   Barry
>> 
>> > 
>> > Jed
>> > 
>> > 
>> >> On Oct 4, 2010 1:00 AM, "Lisandro Dalcin" <dalcinl at gmail.com> wrote:
>> >> 
>> >> On 3 ...
>> 
> 


Reply via email to