Using -spec for callbacks when defining behaviours
Steve Davis
steven.charles.davis@REDACTED
Fri Mar 19 00:46:09 CET 2010
Hi Mikael,
On Mar 18, 6:33 am, Mikael Karlsson <karlsson...@REDACTED> wrote:
> I do not think any of the proposed things will be mandatory, but
> optional,
> 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,
> ..but
> if opaque types (or abstract data types/patterns) become more frequent
> in
> 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.
regs,
/s
More information about the erlang-questions
mailing list