Using -spec for callbacks when defining behaviours
Fri Mar 19 00:46:09 CET 2010
On Mar 18, 6:33 am, Mikael Karlsson <> wrote:
> I do not think any of the proposed things will be mandatory, but
> you can choose to use them at your own will.
For sure, and it's an interesting and useful discussion to have.
> > fwiw, a year ago I would probably have been an active advocate of more
> > language support for type constraints, but the longer I spend building
> I confess I have very ambigous feelings about this, and partly agree,
> if opaque types (or abstract data types/patterns) become more frequent
> Erlang I guess there will be more need for type specifications.
I'd temper this with the known effective approaches:
1) "let it crash"
2) apply checks only at the application/system boundary
..to which I'll add...
3) beware any form of cruft.
More information about the erlang-questions