FAQ terminology harmonisation

Rick Pettit rpettit@REDACTED
Thu Apr 3 21:44:25 CEST 2003


On Thu, Apr 03, 2003 at 01:28:43AM -0800, Thomas Lindgren wrote:
> Misspelled variables are caught by the compiler. (Esp.
> if you use warn_unused_vars.)

Ok.  Can't remember the details on what was misspelled (i.e. variable or 
function), so please excuse that remark.

> * The main benefit of Erlang, Lisp, Prolog, SML and so
> on is _type_safeness_: there is no way that you can
> accidentally confuse one value's type with another.
> This (along with GC and pureness) gets rid of the
> majority of errors.
> 
> (This is also known as 'strong typing', not to be
> confused with 'static typing'.)

Ah, thank you for clarifying.

> * Finally, static typing in the sense above is
> prescriptive: it will reject programs that are okay
> because it can't prove they are (e.g., heterogenous
> lists were rejected for a long time; not sure about
> whether it's handled well these days). This may mean
> you have to 'code around' the problem, though a static
> typing guy might say you are removing a latent bug.
> 
> Also, the programming language designers will have to
> restrict programs to enable checking (e.g., receive
> ... end is hard to check in its current form, since
> any process can potentially send to any process, as is
> hot code loading, for obvious reasons).

Agreed.

> To summarize:
> 
> Personally, I find that static typing in its current
> form adds little value to my Erlang programming.
> Errors due to type mistakes do appear, but not so
> frequently as to make it a major problem. The
> consequences are exceptions, not core dumps or quiet
> madness, so debugging is easier than in the C++ case.

Quiet madness is certianly no good. As for core dumps, I personally find
them pretty easy to make use of. If you know how to run a backtrace and
work with thread info, etc, you can pretty quickly find out what went
wrong and in what thread. I will not argue though that this is easier
than debugging Erlang code (in fact I cannot, since as I have said before
I am no Erlang/OTP HaXoR ;-)

> (An opinion: Making Erlang even easier to test would
> probably be more pragmatically beneficial than adding
> static typing.)

Seems to make sense.  Thank you for clearing some of this up for me.

-Rick



More information about the erlang-questions mailing list