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

Isaac Gouy igouy2@REDACTED
Wed Nov 5 00:33:25 CET 2008


--- Richard O'Keefe <ok@REDACTED> wrote:

> 
> On 5 Nov 2008, at 9:38 am, Steve Davis wrote:
> > I'm not that familiar with Smalltalk but I understand that single
> > inheritance and entity concepts in Java were influenced heavily by
> > Smalltalk - in which case I'd have to disagree. Interfaces were the
> > original "solution" (among other things, to make up for lack of
> > multiple inheritance) but led to massive code repetition. Mixins
> were
> > then tried as extensions of decorators but have their own "diamond
> of
> > death" style issues. Traits seem to be another attempt that
> > importantly *disallow access to state*. Hence my comments...
> 
> Traits don't disallow access to state.
> They disallow *direct* access to state.
> They can use as much state as they want,
> provided they do so by calling methods from the
> class they are extending.

In other words, traits disallow access to state and require methods in
the class (not in the trait) for access to state :-)


      



More information about the erlang-questions mailing list