<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><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><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><story><title>Elixir, a functional metaprogramming-aware language built on the Erlang VM</title><url>http://elixir-lang.org/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>nnq</author><text>sorry to ask, but what do you mean by &quot;unprincipled metaprogramming&quot;? what would be &quot;principled metaprogramming&quot; to contrast it with? (it&apos;s really the first time I heard the terms in a macro discussion...)</text><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><story><title>Elixir, a functional metaprogramming-aware language built on the Erlang VM</title><url>http://elixir-lang.org/</url></story>