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: Mike Gran
Subject: Re: A bit further toward the flamewar
Date: Thu, 13 Oct 2011 11:37:50 -0700 (PDT)

>>  Anyway this second, proof side of types, is the side that Scheme does
>>  not have.  C has a stronger story in that regard.
> 
> Lack of types in scheme has made me day-dream about learning
> ocaml or haskell.  My pet peeve about scheme is that, when
> maintaining old code, its very very hard to just "know" what type
> some lambda is expecting.  And, to me, this makes scheme
> sometimes very hard to read.
> 
> very-hard-to-read == bug-prone
> 

It is hard to know what types a procedure expects.  I've wondered
why paradigms like the following weren't more popular.
 
(define (func a b)
  (assert-string a)
  (assert-list b)
   ...
 
In the great never-ending Lisp/Scheme flamewar, I always end up
on the "Lisp/Scheme lacks visual clues" side of the argument.  Scheme
is just hard to read.
 
(One project I never seem to get around to is figuring out
guile-reader so I code up Wheeler's sweet-expressions: a better
version of SRFI-49.  That helps the "visual clues" problem. But
that doesn't really help the type-check contract problem.)
 
I would add that most scheme distributions have very limited debugging
facilities as compared to most C debuggers.  Guile has improved quite
a bit, but, it is not gdb.
 
Personally I tend to fall back on 'debug by print' paradigms with scheme.
 
-Mike Gran



reply via email to

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