Home > Back-end >  Does Elixir have a language specification?
Does Elixir have a language specification?

Time:10-18

Does Elixir have a language specification document? If yes, where is it?

The Elixir website has library documentation, and I found some documentation on guards and operators, but I did not find a language spec that, for example, documents syntax or provides a list of Elixir keywords (Elixir language keywords, not Keyword lists).

CodePudding user response:

There's no formal specification. Here are some things to look at, that describe the language and might be useful:

  • Syntax Reference - available only in master docs.
  • Kernel.SpecialForms - these are the things that are provided "by the language" and cannot be changed - more or less like keywords in other languages. Everything else is macros/functions implemented in Elixir.
  • Kernel - this module is imported by default and can be viewed as the "base" of the language - everything from here can be locally changed by importing, though.

CodePudding user response:

Syntax Reference is the best place to get specification.

Actually I am looking for atom, but found in spec missing mention this:

These are atom too:

:/
:.

CodePudding user response:

I have just recently switched from Eiffel to Elixir. Eiffel has an outstanding language specification document (see link). This is a BNF-E and is written extremely well. The language is excellent for a 1980s OO, but it is not the power of Elixir by any stretch. Still–the way I became an Eiffel expert was by reading and understanding the language rules (BNF-E specification). It taught me how to "Think like my compiler".

I now want to do the same for Elixir (see here), as I am moving on into this exciting new language system. However, I am finding documentation that is very surface, but nothing that tells me what my choices are from the compilers point of view. To do that, I need to language specification.

The closest I can find so far is found on Github (here), but it is poorly made. I would love to find a company that would be willing to work with me to build such a language specification for Elixir and then a training program built on top of that!

  • Related