Re: [ng-spice] Readline Response
Manu Rouat wrote:
>
> Michele Quarantelli wrote:
>
> > >
> > > My feeling is that c++ should be avoided - if we intend to rewrite
>spice entirely
> > > (under a GPL license this time) then we can use ACS version 0.13 which
>is still in C.
> > >
> > > manu
> > >
> > Actually, if carefully coded C++ could give us more flexibility in the
>future
> > expansions of the simulator.
>
> That's not really the point - C++ is far less commonly known than C in
> the enginering world, significantly reducing the possible pool of
> contributors and testers/patchers.
>
> It's certainly not a coincidence that the majority of open source
> projects are coded in C rather than C++.
>
> manu
Spice 3 predates any reliable C++ compilers, otherwise it might well
have been done in C++.
Unfortunately there are still few reliable C++ compilers (g++ being
the only one I've used, and 2.95 doesn't work on code that works with
2.8.1). Sun's Workshop 5.0 doesn't seem to come close to g++ (spurious
run-time behavior), and the last Borland I tried wouldn't even compile
my code.On the other hand most C compilers do the right thing.
Having said that, C++ does have a few advantages over C when trying
to mix code from multiple projects, and integrates fine with good old C
code.
I would suggest that new interfaces for ng-spice are coded as C++ classes
using virtual functions, to make it easier to integrate ng-spice into
other tools (e.g. my v2k project).
BTW, on the 'readline' subject, most of Linux is GPL'd but people sell
applictions that run on it. Those applications use GPL'd run-time
libraries and support (e.g. XFree86), so not 'mixing' code licenses does
not seem to apply consistently, i.e. run-time dynamic loading of
differently licensed libraries does not seem to be a problem. So if
you want to use 'readline' etc. it should be OK to supply a build that uses
those libraries if they are installed - what you can't do is cut & paste
the code or statically link it and deliver the resulting executable.
Regards,
Kev.
PS: The guy who wrote Spice 3 got a PhD for translating it from Fortran,
so maybe Berkley will give someone a Phd for translating it to C++ :-)
--
http://www.v-ms.com
mailto:admin@v-ms.com Mixed Signal Simulation
Partial thread listing:
- Re: [ng-spice] Readline Response, (continued)
- Kev