[erlang-questions] alternative syntax to '-spec' attributes.

Anthony Ramine n.oxyde@REDACTED
Tue Jan 29 10:19:24 CET 2013


That is an old and deprecated syntax that predates the one everyone knows.

-- 
Anthony Ramine

Le 29 janv. 2013 à 01:49, Eric Merrit <ericbmerritt@REDACTED> a écrit :

> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list