by sodapopcan · 3y ago · 0 comments
Even the regular syntax is sort of lispish, though, if you remove the syntactic sugar. It's all macros and datastructres.
defmodule Foo do
def bar do
"baz"
end
end
is really: defmodule Foo, do: (def bar, do: "baz")
...which is lispish if you squint the right way. defmodule(Foo, [{:do, def(:bar, [{:do, "baz"}])}])
Even aliases (like Foo) are also a kind of syntactic sugar for a specific type of atom (Foo is actually the atom :"Elixir.Foo")