[erlang-questions] alternative syntax to '-spec' attributes.
Eric Merrit
ericbmerritt@REDACTED
Tue Jan 29 01:49:32 CET 2013
There seems to be an alternative syntax for specs. Lets say we have a spec declared in the traditional way
-spec to_boolean(term()) -> boolean().
We could also declare it the following way and have it be consumed without problems
-spec to_boolean/1 :: (term()) -> boolean().
I like the second way quite a bit since it visually distinguishes between spec declarations and function declarations better then the traditional syntax. However, I recently went looking for documentation on this and now can't find it. So I am wondering what its status is.
Thanks,
Eric
More information about the erlang-questions
mailing list