[erlang-questions] Why is Erlang what it is?

Serge Aleynikov <>
Thu Dec 14 23:45:12 CET 2006


t ty wrote:
> My intro to FP was via Haskell and prior to that I used Eiffel. I'm a
> fan of static typing however I haven't seen empirical evidence
> supporting the statement that static typing reduces testing. To be
> fair Dominic did say *might*.

I haven't seen such evidence either.  Perhaps it is hard to find because 
from the industrial point of view quite rare (if any at all) to find a 
company that would actively use multiple languages (such as Haskell, 
OCaml, Erlang, C++, Java, etc) for product development, and do such a 
comparative analysis.  Same goes for academic institutions that don't 
have the same project implemented and maintained in such diverse 
languages that would allow to make reasonable conclusions on reduction 
of testing.

> You also bring up a good point. If the compiler, to paraphrase Ulf,
> goes medieval with your code until you conform aren't you just
> replacing testing effort with coding effort ?

On the other hand, where would you rather find an error during the 
coding phase or the testing phase?  :-)

> Furthur more the purpose of testing is to find defects not to prove
> they do not exists. i.e. the amount of testing should not decrease,
> after all your static checking typed inferred compiler might have
> typing bugs too :)

Frankly, where I think static typing is advantageous is in code 
refactoring.  The compiler with static checking helps a lot at fixing 
all inter-dependencies when types are being modified.

Regards,

Serge




More information about the erlang-questions mailing list