[erlang-questions] Intel Quad CPUs
Thu Sep 6 23:15:41 CEST 2007
On 6 sep 2007, at 22.14, Damien Morton wrote:
> +1 on less syntactic clutter.
> The /2-ness of foo is clear from the remainder of the type
> There are redundant parentheses too - are they neeed?
> -spec(foo :: (integer, float) -> atom)
> just reads better to me
The parentheses are needed to distinguish between a literal and a type.
integer() means any integer.
integer means the atom 'integer'
>> On Tue, 4 Sep 2007, Kostis Sagonas wrote:
>>> In the new language you would write (or preferably change the
>>> above edoc
>>> comment to be):
>>> -spec(foo/2 :: ((integer(), float()) -> atom())).
>> What is the reason for the trailing ()s? It would be nice if the
>> had less redundant visual noise.
> erlang-questions mailing list
More information about the erlang-questions