RE: [ng-spice-devel] variable.c


To "'ng-spice-devel@ieee.ing.uniroma1.it'" <ng-spice-devel@ieee.ing.uniroma1.it>
From "Gillespie, Alan" <Alan.Gillespie@analog.com>
Date Thu, 30 Nov 2000 17:56:01 -0000
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it


> Here is the problem. When ss contains a number, the 
> ft_numparse increment ss so that at the end of the parsing ss 
> points to the end of the allocated area. Freeing ss results 
> to a segfault. If ss doesnot contains a number there is no problem.
> So to fix the bug something like the following must be done. 

No need to apologise, Glao. Even the person who wrote
ft_numparse made a simple mistake. The person who should
apologise is the one who designed C in the first place.
C gives you lot's of rope to hang yourself, and also
ties the knot and kicks away the chair, in my humble
opinion.

Both Al and Jon are campaigning hard for us to move to
C++. I think they're right, in that, with good practice,
C++ should theoretically be better at notifying you of
your mistakes at compile time. Unfortunately, you still
have all the rope to hang yourself, etc., and given how
inexperienced I am with it, I feel like I've been
blindfolded and enticed unknowingly onto the chair as well.

Unfortunately, there's not much alternative, as the only
well designed language I know of that has good, readily 
available tools, is Pascal. But I get the impression that
most C/C++ programmers wouldn't move to that. It certainly
would be a mammoth task to translate Spice into yet another
language, although to gain any advantage from C++, you
probably need to do just that. If we just use the C backwards
compatibility, then C++ would make no difference. (Take the
case above, for example).

The "marketing" blurb for C++ implies that we should be able
to start adding new stuff in C++, get the type checking
advantages and stuff, without having to rewrite Spice. I
don't know if that really works, or not.

I think moving away from C is a good thing, and if C++ is
the only option, then so be it.

At first sight, it doesn't seem right to make the decision on
whether to go forward with Spice or ACS be decided by the fact
that C is a crap language. However, if ACS really is built from
the ground up in C++ (properly, i.e. without using the filthy
C like stuff) then it is significantly more advanced than Spice
for that reason alone.

Has anyone been looking at ACS ? Jon's email suggests he got the
impression that some of us were "pushing" to stay with Spice. Is
that the the right impression ? For myself, it's just inertia.
I know my way around Spice now, and I can track down things
reasonably quickly. It'll take a bit of time to get that familiar
with ACS. The only reason I'm still looking at Spice is 'cos I
can.

Has anyone else got any feelings on the Spice/ACS thing ?
Or the C/C++ thing ?

Cheers,

Alan

Partial thread listing: