25 Dec 2003 cmm   » (Journeyer)

cactus: what does type safety (or lack thereof) have to do with CMUCL's compiler not checking type declarations across function calls?  you still get the runtime check, so your program is safe.

consider that the people who do not view Lisp as a kind of C++ (and such people are, thankfully, the majority of Lisp users) really appreciate CMUCL's reluctance to perform invasive compile-time checking of function argument types.  that's because in Lisp, unlike in C++, functions can be redefined at any time.  if you still want the compiler to perform such checks, though, try declaiming FOO's type at the top level (so that it effectively becomes a part of FOO's interface), like this:

(declaim (ftype (function (float) float) foo))

that way you will (among other compiler verbiage) get a warning about the type of 1 not being FLOAT.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!