> On Jun 22, 2018, at 12:21 PM, Michael Van Canneyt <mich...@freepascal.org> > wrote: > > 'Nice' is not an argument. > > If someone else assumes that assert() works as expected - i.e. throws an > exception, then your macro will mess up his code, leading to > unpredictable results. > > From my - admittedly subjective - point of view, your examples only serve to > demonstrate why we should definitely not support macros...
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. Btw why was the $define:= syntax ever introduced in the first place? adding a parameter to the syntax is a minor extension but it sounds like Pascal programers here really don’t like it in general. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal