<story><title>Elixir, a functional metaprogramming-aware language built on the Erlang VM</title><url>http://elixir-lang.org/</url></story><parent_chain><item><author>colanderman</author><text>1) Where is the language documentation?  The &quot;Docs&quot; section only seems to address the libraries.  Libraries are uninteresting if you&apos;re designing a new language.&lt;p&gt;2) How does Elixir address the problems that Javascript-style metaprogramming (i.e. first-class definitions) cause for automatic program analysis?  Erlang has some great analysis tools (e.g. Dialyzer) precisely because it&apos;s simple.&lt;p&gt;3) How is Elixir&apos;s first-class definition approach more useful than multi-stage programming (such as MetaOCaml: &lt;a href=&quot;http://www.metaocaml.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.metaocaml.org/&lt;/a&gt;), principled syntax extension (such as CamlP4: &lt;a href=&quot;http://pauillac.inria.fr/camlp4/&quot; rel=&quot;nofollow&quot;&gt;http://pauillac.inria.fr/camlp4/&lt;/a&gt;), or second-class higher-order modules (such as OCaml&apos;s functors), each of which are inherently more amenable to automatic analysis?&lt;p&gt;4) Almost every &quot;old&quot; computer language has slowly moved &lt;i&gt;away&lt;/i&gt; from unprincipled metaprogramming precisely because it&apos;s difficult to reason about, for both humans and computers.  (C, JavaScript, and Python, to name a few, all have unprincipled metaprogramming facilities, which have been, over time, relegated to specific use patterns to maintain coder sanity.)  What do we hope to gain from a new language whose &lt;i&gt;raison d&apos;être&lt;/i&gt; is based on this feature?&lt;p&gt;(P.S. All these points seem to apply equally well to Joe Armstrong&apos;s &quot;erl2&quot;.)</text></item></parent_chain><comment><author>rayiner</author><text>&amp;#62; 4) Almost every &quot;old&quot; computer language has slowly moved away from unprincipled metaprogramming precisely because it&apos;s difficult to reason about, for both humans and computers. (C, JavaScript, and Python, to name a few, all have unprincipled metaprogramming facilities, which have been, over time, relegated to specific use patterns to maintain coder sanity.) What do we hope to gain from a new language whose raison d&apos;être is based on this feature?&lt;p&gt;This complaint makes little sense, because macros are expanded entirely at compile-time. Reasoning about a macro is no harder than reasoning about a higher-order function: you reason about the macro function (which is a simple transformation on some tree data structure), and the generated function. Because a macro is always expanded at compile-time, you can always expand it and inspect the generated function.&lt;p&gt;I wouldn&apos;t use Javascript and Python as examples here--those languages, suffering from their lack of meta-programming, instead encourage heinous things like monkey-patching and runtime introspection, which are insanely difficult to reason about.&lt;p&gt;Compare: what I might do in Common Lisp by writing a set of macros (and checking the expansions--just a hotkey away in my IDE) I&apos;d do in Python by adding fields and methods to objects at runtime.</text></comment>
<story><title>Elixir, a functional metaprogramming-aware language built on the Erlang VM</title><url>http://elixir-lang.org/</url></story><parent_chain><item><author>colanderman</author><text>1) Where is the language documentation?  The &quot;Docs&quot; section only seems to address the libraries.  Libraries are uninteresting if you&apos;re designing a new language.&lt;p&gt;2) How does Elixir address the problems that Javascript-style metaprogramming (i.e. first-class definitions) cause for automatic program analysis?  Erlang has some great analysis tools (e.g. Dialyzer) precisely because it&apos;s simple.&lt;p&gt;3) How is Elixir&apos;s first-class definition approach more useful than multi-stage programming (such as MetaOCaml: &lt;a href=&quot;http://www.metaocaml.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.metaocaml.org/&lt;/a&gt;), principled syntax extension (such as CamlP4: &lt;a href=&quot;http://pauillac.inria.fr/camlp4/&quot; rel=&quot;nofollow&quot;&gt;http://pauillac.inria.fr/camlp4/&lt;/a&gt;), or second-class higher-order modules (such as OCaml&apos;s functors), each of which are inherently more amenable to automatic analysis?&lt;p&gt;4) Almost every &quot;old&quot; computer language has slowly moved &lt;i&gt;away&lt;/i&gt; from unprincipled metaprogramming precisely because it&apos;s difficult to reason about, for both humans and computers.  (C, JavaScript, and Python, to name a few, all have unprincipled metaprogramming facilities, which have been, over time, relegated to specific use patterns to maintain coder sanity.)  What do we hope to gain from a new language whose &lt;i&gt;raison d&apos;être&lt;/i&gt; is based on this feature?&lt;p&gt;(P.S. All these points seem to apply equally well to Joe Armstrong&apos;s &quot;erl2&quot;.)</text></item></parent_chain><comment><author>jeremyjh</author><text>1) The language introduction is found under the Getting Started link: &lt;a href=&quot;http://elixir-lang.org/getting_started/1.html&quot; rel=&quot;nofollow&quot;&gt;http://elixir-lang.org/getting_started/1.html&lt;/a&gt;&lt;p&gt;2) Dialyzer works fine on Elixir beam files. You can specify type &amp;#38; spec attributes just like in Erlang.&lt;p&gt;If macros worry you unduly, then Elixir is not for you. I personally prefer to use macros than type lots of boilerplate code, but yes there are some downsides.&lt;p&gt;edit: Actually I should have said reading and typing - reading boilerplate is much worse than writing it.  Judicious use of macros can clarify intent for someone reading the code.</text></comment>