[erlang-questions] Why isn't erlang strongly typed?

Richard O'Keefe ok@REDACTED
Thu Oct 23 02:36:51 CEST 2008


On 23 Oct 2008, at 12:11 pm, Kostis Sagonas wrote:

> Richard O'Keefe wrote:
>> On 22 Oct 2008, at 3:18 am, Steve Davis wrote:
>>
>> There have been several attempts to provide type systems
>> for Erlang.  It took a long time to get one that was
>> found to be satisfactory in practice, but it's there now
>> in documentation and in the Dialyzer and Typerl.
>>
>> However, even that system is not as expressive as one
>> might wish.
>
> Indeed it isn't.

I should have written more clearly.
That wasn't intended as a criticism.
ANY type system has to strike a balance between
expressiveness and practicality.

To me, the type system in Haskell98 is just about perfect.
Almost any step you take beyond it loses you something.
Rank-2 polymorphism (which GHC supports) loses you type
inference.  Fortunately, you can still infer rank-1 types
even in the presence of a few know rank-2 types.
Dependent types can lose you decidability.  (Indeed, the
C++ type system is not decidable.  C++ compilers are not
in fact required to get it right.)





More information about the erlang-questions mailing list