News for hackers. Stuff that matters.
Re:Lisp Hackers: Marijn Haverbeke by blue1 on Tuesday April 03, 2012 @03:30AM (#3791917)
don't you get a similar benefit in common lisp by generously adding declarations? (esp. in sbcl with high levels of SAFETY)
Re:Lisp Hackers: Marijn Haverbeke by marijn on Tuesday April 03, 2012 @03:47AM (#3791958)
As far as I know, no. You can get SBCL to point out some intra-function inconsistencies through declarations (or, in fact, often even without declarations), but I haven't found a way to make it warn when, outside of function X, I'm calling it with types different from the types associated with the arguments through declarations.
Re:Lisp Hackers: Marijn Haverbeke by blue1 on Tuesday April 03, 2012 @03:52AM (#3791970)
(declaim (safety 3) (ftype (function ({argument types}) {return types}) {function name}))

It checks both at compile time and at run time. I find it great for bug squashing. See http://www.sbcl.org/manual/index.html#Declarations-as-Assert...

Re:Lisp Hackers: Marijn Haverbeke by marijn on Tuesday April 03, 2012 @03:58AM (#3791986)
That's neat. Thanks. Might be worthwhile for APIs.
Re:Lisp Hackers: Marijn Haverbeke by cageface on Tuesday April 03, 2012 @04:04AM (#3792003)
I suppose you get at least some of the benefit. The other half of the advantage of a relatively simple statically typed language like Java is that IDEs can do really amazing structural transformations of your code. When I'm working in IntelliJ I'm constantly aggressively refactoring my code in ways I wouldn't dare in a language with less rigid syntax.