rvirding

rvirding

Creator of Erlang

Where can I find a proper Elixir language reference manual? Need it for courses. The web site is very much a tutorial, as are the books.

First Post!

minhajuddin

minhajuddin

These seem to have all the reference documentation:

http://elixir-lang.org/docs/stable/elixir/Kernel.html

Most Liked

michalmuskala

michalmuskala

In 1.5 the docs gained some new pages (and expanded some of the old ones):

This forms a large part what I would understand as a “language reference”.

Together with the:

This covers most, if not all, things you’d be facing using Elixir day-to-day.

josevalim

josevalim

Creator of Elixir

We can easily break that page in two. We can start with the Syntax reference and then have an AST reference that goes over the same sections but containing AST information. This way you get the benefit of both in the same page but you can still learn the syntax without reading through the AST bits.

rvirding

rvirding OP

Creator of Erlang

I think you need a reference manual for the language. Now most of what most people (me anyway :slight_smile:) would consider language constructs are described in Kernel and Kernel.SpecialForms as if they are function/macro calls, not as language constructs. I know that this is what they really are, and that sometimes this is important, but for describing “the language” this does not make sense. Yes, there are tutorials and books that are good but somewhere I need a reference of the language, or at least what I perceive as being “the language”.

The Erlang reference manual is not too bad in this respect. It is not a formal language description but it systematically goes through all the language constructs. I can find each construct, or group of constructs, and see what they should look like and what they do. For example I can see all the arithmetic operators grouped together with a simple description of what each does. I can also see the relative priorities. You can also link into the module documentation when necessary.

I think being able to group constructs is a useful thing with a reference manual. For example I could see everything about defining macros in one place and get better feeling for how they work together. Or everything about modules in one place.

Another problem with Kernel and Kernel.SpecialForms is that they differentiate between functions and macros which is generally not that interesting for users. It is correct and relevant when describing these modules but not when describing the language. For me the user it is not interesting that case is a macro.

I think the difference between a tutorial/book and a reference manual is that the reference manual is a more structured description while the tutorial/book are often more example driven. You need both but for different things.

I hope this wasn’t too garbled.

Last Post!

OvermindDL1

OvermindDL1

Just an aside, if really should not be a special form or parsed with the syntax or anything of the sort in Elixir, it could easily be just a macro like:

defmacro if(cond_ast, bodies) do
  then_body = bodies[:do]
  else_body = bodies[:else]
  quote do
    cond do
      unquote(cond_ast) -> unquote(then_body)
      true -> unquote(else_body)
    end
  end
end

Or something of that sort. There’s no reason for it to be anything but a macro in Kernel, oh and look it is (although it does some weird stuff like special case the random atom nil and such… *cough* still not a fan of nil being special at all), but yea it is not syntax, nor is def as it is just a macro as well.

The point of this is, since they are macro’s then the user could override them to make them do something else (like how I override def in my defguard library to allow you to define super-guards like is_struct (I still think my style (though complete) of defguard should be built-in to elixir) (I might be in a lisp’y mood…)), but because of that syntax coloring them special may not always make sense, like say in a DSEL.

What I really really hate being special-form’d are things like with and for, both of those could have been done in other more traditionally ‘macro’ ways without the comma-splosion, but since they are special-formed then syntax coloring on them can be specialized…

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews