meta-comment on typing
Per Bothner
(05 Oct 2005 17:35 UTC)
|
Re: meta-comment on typing
John.Cowan
(05 Oct 2005 22:00 UTC)
|
Re: meta-comment on typing
Per Bothner
(05 Oct 2005 22:14 UTC)
|
Re: meta-comment on typing
John.Cowan
(06 Oct 2005 04:55 UTC)
|
Re: meta-comment on typing Michael Sperber (06 Oct 2005 06:03 UTC)
|
Re: meta-comment on typing
Per Bothner
(06 Oct 2005 15:35 UTC)
|
[SRFI 77] integer-length and integer-sqrt
Jens Axel Søgaard
(06 Oct 2005 15:54 UTC)
|
Re: meta-comment on typing
Michael Sperber
(06 Oct 2005 16:17 UTC)
|
Re: meta-comment on typing Michael Sperber 06 Oct 2005 06:02 UTC
Per Bothner <xxxxxx@bothner.com> writes: > Personally I prefer to specify which operation to use by (optional) > type declarations, rather than explicitly specying the operation. > That is more like what other languages do, including Common Lisp. > Specifying parameter, returns, and global variable types is better > for documentation, better for error-checking, and is easier for > compilers to generate better code. Also, it makes the code more > readable. It's a choice bwteeen: > (define (square-sum (x :: <flonum>) (y :: <flonum>)) > (+ (* x x) (* y y))) > or: > (define (square-sum x y) > (fl+ (fl* x x) (fl* y))) I personally have no objection to type declaration, but disagree that the code becomes more readable. In fact, I've seen plenty of evidence that the exact opposite is the case, both in the C world (with type declarations) and in the R5RS/CL world (without). Some anecdotal evidence can be found in the paper by Egner et al. cited at the bottom of the SRFI. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla