[erlang-questions] 12B4 dialyzer problem 5
Kostis Sagonas
kostis@REDACTED
Wed Sep 17 23:59:24 CEST 2008
Anthony Shipman wrote:
> On Thu, 18 Sep 2008 12:56:54 am Kostis Sagonas wrote:
>>
>> To avoid typos like that, which sadly are very common, we _strongly_
>> recommend that you follow the convention of writing atoms quoted in spec
>> declarations. I.e. that you write:
>>
>> -spec getHandlerModule(string()) ->
>> {'ok', Module::atom(), StrmID::integer()} | 'error'.
>
> I think that that would only work well if dialyzer required it or warned when
> it found an unquoted atom.
You are right. This has been on our wish list (not for Dialyzer, but for
the compiler), but it is very difficult to do since the quotes are
removed as early as the tokenizer in Erlang. Seems very difficult to
achieve.
Kostis
More information about the erlang-questions
mailing list