<div dir="ltr"><div class="gmail_extra">><span style="font-family:arial,sans-serif;font-size:13px">Sure macros allow you to write less code. But I spend 90% of my time reading code, so I like programs that are optimized for my reading. If I always need to refer to some other source file or document to understand what the code is doing, then I am not going to be using your program very long.</span></div>
<div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">But when you see unknown function you still have no idea what it does and you have to figure it out. Any abstraction works in same way.</span></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">><span style="font-family:arial,sans-serif;font-size:13px">And then one person creates maps, another creates frames, both with the same or similar syntax but with different semantics, both get used in the same system, and the code is completely unreadable. No thanks.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">Macros are dangerous as much as powerful. If programmer does not use them correctly its a programmer's fault. In the end who is the target audience of a programming language for concurrent, fault tolerant systems? Probably the programmer who understands what he does. Should language designer force programmer to write code in 'correct' way? I don't know, but valuable spaces and programming patterns appeared from such ideas.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">></font><span style="font-family:arial,sans-serif;font-size:13px">You don't need it.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><font face="arial, sans-serif">Who but the particular programmer can decide what does he need and what doesn't ?</font></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">
2014-02-22 21:46 GMT+04:00 Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<div><br>
<br>
On 02/22/2014 10:14 AM, Maxim Velesyuk wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Often when I feel I need to change ast I remember how clumsy and<br>
uncomfortable parse transform is, so I overcome myself and make workarounds.<br>
</blockquote>
<br></div>
Why do you even feel the need to change the AST? Don't do that.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
But macros are still useful, programmers use parse transform when they<br>
have no other choice, and projects like merl appear.<br>
</blockquote>
<br></div>
Macros are not useful. Macros are what makes a perfectly readable program into the worst spaghetti code you have ever seen. Even EPP macros, which look pretty harmless as they have very limited capabilities, can make things a lot worse than it needs to be.<br>
<br>
Sure macros allow you to write less code. But I spend 90% of my time reading code, so I like programs that are optimized for my reading. If I always need to refer to some other source file or document to understand what the code is doing, then I am not going to be using your program very long.<br>
<br>
Macros make your programs worse than PHP and Java combined.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
List and zip comprehensions could be implemented as macros, ets and<br>
mnesia query language is actually prefix-notation language with code<br>
quoting, even pattern matching and so long expected maps could be just a<br>
libraries.<br>
</blockquote>
<br></div>
And then one person creates maps, another creates frames, both with the same or similar syntax but with different semantics, both get used in the same system, and the code is completely unreadable. No thanks.<div>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Take a look at c++ and java, how they suffer from inventing new syntax.<br>
Hopefully Erlang will not turn in such syntax-monster. It has syntax for<br>
many things, but it still not as flexible as it could be.<br>
<br>
This forwards me back to my first question, why?<br>
</blockquote>
<br></div>
You don't need it.<span><font color="#888888"><br>
<br>
-- <br>
Loïc Hoguin<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a></font></span> </blockquote></div></div></div>