guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A bit further toward the flamewar


From: rixed
Subject: Re: A bit further toward the flamewar
Date: Thu, 13 Oct 2011 20:54:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Your critique about C values that can be made invalid (through lack of
proper initialization or erroneous cast) are of course valid but sounds
quite rhetorical, since in practice, in my experience, this does not
cause many bugs (yet I'm sure you could site several examples of such
bugs).  What's of more practical importance to me is that when you
change a data structure somewhere you can be confident that the compiler
will spot every other places where your changes require other changes.
You have not this safety with Scheme, and this is much more problematic
; again, in my experience.  You have to run your code with all possible
inputs in order to make certain that you did not forget to propagate
your changes somewhere. This happened to me again two weeks ago when I
decided that my small guile-agentx library should use bytevectors
instead of strings to read/write from the socket. This small change had
many other small impacts but I was alone to find them, had to run the
code in many different situation to test many path before I gained
enough confidence that I didn't forgot some string operation somewhere
- yet this is a very small library!

Of course, I'm a beginner in Scheme so that might explain why my brain
lacks the necessary equipment to typecheck myself ; while my first
hello.c was written more than 20 years ago so maybe that's why I find C
quite safe in practice.

So, all in all, who knows? But I for sure would like to see type
annotations added in guile some day :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]