since developing object oriented software is so cumbersome in C and we are all resistent to doing it in C++

Jed Brown jed at 59A2.org
Mon Dec 7 15:03:25 CST 2009


On Mon, 7 Dec 2009 10:53:10 -0500, Alex Peyser <peyser.alex at gmail.com> wrote:
> I've had endless trouble integrating petsc into my system because the "object-
> oriented" C is both only partially "object oriented" while simultaneously 
> making access to the underlying functionality obscure.

Okay, I'm curious what you find to be only "partially OO", and what
functionality you find difficult to use.  PETSc's approach to object
creation might look a bit unconventional (depending on what languages
you're familiar with) but it's very much a modern OO pattern, see

  http://martinfowler.com/articles/injection.html


In my opinion, the main downside of C is that it requires a significant
amount of boilerplate to implement these patterns (though not a lot more
than designs with comparable properties in C++ or Java).  I'm not in
love with Python, but there is a large amount of PETSc that is in no way
performance sensitive, it would be very nice to do this in a more
expressive language than C.

Jed



More information about the petsc-dev mailing list