[C++-sig] Re: Pyste: your opinion about some changes

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sun Jul 13 09:12:45 CEST 2003


>>>>> "DA" == David Abrahams <dave at boost-consulting.com> writes:

    DA> Nicodemus <nicodemus at globalite.com.br> writes:
    >> The advantages of this method is that the dependencies between
    >> the files are explicit in the pyste files themselves, plus it
    >> feels more natural than passing all pyste files in the command
    >> line in order to generate code for only one of them. The
    >> disadvantages is that it complicates the pyste files a little,
    >> and changes the way that Pyste currently works.

    DA> Sounds like all the advantages go to the users and the
    DA> disadvantages go to the developer.  I vote for this one ;-)

I'm very glad that you do!  It does make life much easier when
wrapping multiple Pyste files.  I don't think this feature would be
hard to implement either.  I think what Nicodemus was referring to in,

 "complicates the pyste file a little, and changes the way that Pyste
  currently works."

was that users now need to remember to add an Import('base.pyste')
before they wrap Class('Derived') inside derived.pyste.  If not, the
bases will not be right.  However, I think thats quite OK since users
will know the bases that they wrap -- atleast they will know what
bases the currently wrapped classes are derived from.  The scheme also
is similar to what one would expect in C++.  The Import function is
similar to the %import directive in SWIG.  So SWIG users will also be
comfortable with this function.  Best of all, the import directive is
optional, so all current users of Pyste will not notice any difference
since the original behavior will be unchanged.  Its only when one
needs to wrap the library incrementally that this function helps
heaps.  It is also useful when you need to split the library into
small sub-packages where if you have classes in one sub-package
derived from bases in another sub-package.

The second issue is that it changes the internals of Pyste a little,
but I think it will not be a big change at all.  We've made much
bigger ones in the past week.  So I'm not sure there are serious
disadvantages to the developer either. :)

Nicodemus, please do let us know if I am seriously mistaken about
something here.

cheers,
prabhu




More information about the Cplusplus-sig mailing list