[erlang-questions] Did Erlang's grammar change in R16A?

Evan Miller emmiller@REDACTED
Thu Feb 14 22:38:13 CET 2013


On Thu, Feb 14, 2013 at 1:08 PM, Richard Carlsson
<carlsson.richard@REDACTED> wrote:
> On 2013-02-14 20:03, Evan Miller wrote:
>>
>> As I understood it, dots are legal in unquoted atom names. This
>> appears not to be the case in R16A. Is this intentional?
>>
>>
>> Erlang R15B03 (erts-5.9.3.1) [source] [smp:8:8] [async-threads:0]
>> [hipe] [kernel-poll:false]
>>
>> Eshell V5.9.3.1  (abort with ^G)
>> 1> a.b.
>> 'a.b'
>> 2>
>>
>>
>> Erlang R16A (erts-5.10) [source] [smp:8:8] [async-threads:10] [hipe]
>> [kernel-poll:false]
>>
>> Eshell V5.10  (abort with ^G)
>> 1> a.b.
>> * 1: syntax error before: '.'
>> 1>
>>
>>
>> Kai Janson noticed this because the "mongodb" package fails to compile
>> under R16A due to a syntax error on an atom with a dot in it.
>>
>> https://github.com/mongodb/mongodb-erlang
>>
>> I couldn't find any mention of changing the grammar in the README. Is
>> this a bug?
>
>
> The automatic concatenation of atoms separated by dots was originally
> introduced with the experimental "packages" system, and was probably lost
> again when this feature was dropped from the codebase.
>
>     /Richard
>


Ah, I see. This is alluded to in the Bible, Chapter 2, Section 8, Footnote 7:

"You might find that a period (.) can also be use in atoms--this is an
unsupported extension to Erlang."



More information about the erlang-questions mailing list