g-wrap and glib container types...

Derek Atkins warlord@MIT.EDU
07 Nov 2000 21:02:51 -0500


Robert Graham Merkel <rgmerk@mira.net> writes:

> g-wrap already gives you more than enough opportunities to cause
> segfaults from scheme.  That's *always* been the case, and I can't see
> how you could design a tool like g-wrap that didn't provide that
> possibility.  
> 
> I would be *very happy* if someone could prove me wrong.  I hate
> segfaults too :)

Well, if not segfaults, it at least lets you cause scheme aborts..  I
do believe that g-wrap does object typing which attempts to prevent
you from passing a scheme object of type X into a C function that
expects type Y.  If you do attempt to do that, you'll get a scheme
abort (see the problem I was getting earlier with passing #f as a
string).

We cannot avoid the fact that scheme code can 'crash' gnucash.  If not
a segfault, then an abort.  Either type of 'crash' is just as bad.
It's just an unavoidable situation.  Any type of bad programming can
cause the program to fail.  Eit.

<insert plea for better scheme debugging environment here>

If we could debug scheme easier, we'd be able to solve these problems
much quicker :)

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/      PP-ASEL      N1NWH
       warlord@MIT.EDU                        PGP key available