[petsc-dev] changed ISCreateGeneral/NC/WithArray()

Jed Brown jed at 59A2.org
Sun Oct 3 18:39:17 CDT 2010

Agree that NC versus WithArray was confusing and difficult for users to

I don't see what overloading has to do with this. Garbage collection would
make a real difference, but overloading basically just lets you implicitly
write the types of arguments into the function name. Writing ownership
semantics into the type is not really workable in C and related languages.


On Oct 4, 2010 1:31 AM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:

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

> We agree about flexibility, I'm just not convinced ...
  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.


> Jed
>> On Oct 4, 2010 1:17 AM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101004/b8007544/attachment.html>

More information about the petsc-dev mailing list