← Back to team overview

dolfin team mailing list archive

Re: PyDOLFIN: [...]

 

On Wed, Oct 12, 2005 at 04:28:24PM +0200, Johan Jansson wrote:
> On Wed, Oct 12, 2005 at 08:50:39AM -0500, Anders Logg wrote:
> > Great. It's good that things can be fixed by adding small pieces of
> > code on the SWIG side, but maybe later we could look at ways to
> > minimize the extra amount of code we need to maintain so everything is
> > automatic (by fixing things on the DOLFIN side)?
> > 
> > /Anders
> > 
> 
> Yes, that's true. It didn't feel right to reimplement the settings
> system to make it work in SWIG though. I think it's better to rewrite
> it when we have some ideas for improvement, and not just as a way to
> get around limitations of SWIG.
> 
> Also, to some extent SWIG is a bit like the wild west, the ambition is
> not to produce a formal mapping between C++ and Python (which is
> probably not even fully possible), but more just to get things to
> work. So I think the threshold for adding hacks, glue, etc. to the
> SWIG interface is (and should be) much lower than for doing the same
> to DOLFIN. What do you think?

I agree.

One thing we could do is to create a list of recommendations that we
could try to follow in DOLFIN to avoid having to add extra stuff on
the SWIG side, like no nested classes in public interfaces, minimize
use of varargs etc. Anything else?

/Anders



References