On Thu 13 Oct 2011 16:26, l...@gnu.org (Ludovic Courtès) writes:

> Hello troll!  ;-)

I think that's a bit harsh ;)

> Scheme is strongly, though dynamically typed.  A string is a string, a
> number is a number, and they cannot change types anyhow.

As time goes on and I learn more things, I wonder how it is that "type"
has gotten so many conflations.  This one certainly has value, but I
guess the CS world uses it in a different way, that types are theorems
about programs.  A program that type-checks is has some corresponding
theorem that has a proof, and proving theorems about a program has value
in terms of reliability, &c.  (It turns out that it doesn't matter much
which theorems are proven!)

Anyway this second, proof side of types, is the side that Scheme does
not have.  C has a stronger story in that regard.

> And of course, this is not to mention the many other ways to shoot
> oneself in the foot–manual memory management being among the most
> prominent

This is what I meant when I said that C was dangerous.  Programs in
Guile have meanings, even seemingly ill-formed programs like

  ((lambda () x))

Because what happens here?  You get an exception.  What happens in C if
you invoke puts without its argument?  You might get a warning, but it
will compile, and at runtime /anything can happen/.

All programs of a sufficient size have bugs.  The question is, what
happens when there is a bug?  In Scheme, the answer isn't usually "the
Chinese/American/German government gets to read your email".  With C it
is.  That is why programming in C is dangerous.

Andy
-- 
http://wingolog.org/

Reply via email to