<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> schrieb am Fr., 22. Juni 2018, 08:01:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On Fri, 22 Jun 2018, Ryan Joseph wrote:<br>
<br>
><br>
><br>
>> On Jun 22, 2018, at 12:21 PM, Michael Van Canneyt <<a href="mailto:michael@freepascal.org" target="_blank" rel="noreferrer">michael@freepascal.org</a>> wrote:<br>
>> <br>
>> 'Nice' is not an argument.<br>
>> <br>
>> If someone else assumes that assert() works as expected - i.e. throws an exception, then your macro will mess up his code, leading to<br>
>> unpredictable results.<br>
>> <br>
>> From my - admittedly subjective - point of view, your examples only serve to demonstrate why we should definitely not support macros...<br>
><br>
> For any example I can give it’s easy to extrapolate into some scenario where it would be a disaster. I get that. The reason I ever wanted to make a macro was for personal use to give some project specific meaning to some construct or a quick hack. Frameworks like Apple uses, often use macros to document parts of code in a way which otherwise isn’t part of the language and no suitable for comments. I’m not saying this is how we all should program. I don’t suggest people go out and start using macros in place of functions.<br>
><br>
> Btw why was the $define:= syntax ever introduced in the first place? <br>
> adding a parameter to the syntax is a minor extension but it sounds like<br>
> Pascal programers here really don’t like it in general.<br>
<br>
A good and just question. We most likely didn't realize the consequences. <br>
Meanwhile we're older, more experienced and we now know what impact seemingly <br>
good ideas can have...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">They were added for MacPascal compatibility: <a href="http://wiki.freepascal.org/Mode_MacPas">http://wiki.freepascal.org/Mode_MacPas</a></div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>