Another bug in Erlang code

Thomas Lindgren thomasl_erlang@REDACTED
Fri Mar 18 13:56:17 CET 2005


--- Luke Gorrie <luke@REDACTED> wrote:

> The difference seems to be that in Erlang you can
> rely on individual
> functions within a module to stay the same so it's
> safe to propagate
> the inferred types of individual functions. In Lisp
> any single
> function can change by itself so you never know if
> there will /really/
> be an error at runtime.

I recall seeing that CMUCL can do block compilation, 
which might be just the thing to use to get "modules".
Though I haven't tried it myself.

> The positive side for Lisp is that you still can
> propagate types that
> are explicitly delcared, the type checker is built
> into the compiler
> (used for optimization as well), and the
> user-interface is very
> convenient.

Also note that several Lisp compilers are capable of
very impressive performance if you add enough type
declarations. There are occasional challenges of this
sort on comp.lang.lisp for those interested.

(The Lisp type system per se can be useful inspiration
too.)

> If I add enough type declarations to my Lisp version
> to make the error
> detectable (lame to have to, I admit) then it's able
> to underline the
> offending expression the moment I compile the file:

DrScheme or MrSpidey or whatever it's called is also
capable of that sort of thing, though for Scheme. Cf.
soft typing.

Best,
Thomas



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 



More information about the erlang-questions mailing list