Hi Vlad,<div><br></div><div>I have relatively big OTP system. I use macros. I don't have any problems you described. What I do wrong?</div><div><br></div><div>I don't debug my code because I think debugging is bad. I do unit tests and ct tests. If after those tests there is a need for debug - my tests are bad. I do better tests. Will this approach work for you too?</div>

<div><div><br clear="all"><div>Best regards,</div><div>Max</div><br><br>
<br><br><div class="gmail_quote">On Thu, May 24, 2012 at 12:52 PM, Vlad Dumitrescu <span dir="ltr"><<a href="mailto:vladdu55@gmail.com" target="_blank">vladdu55@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
There have been discussions now and then about the preprocessor and<br>
how it would be better to get rid of it. As someone that has to parse<br>
and handle source files before they are preprocessed, I am very much<br>
affected by it -- with macros that can be anything, an raw Erlang file<br>
can look like pretty much anything. Even if the macros are in practice<br>
mostly well-behaved, using them as alternatives to inlining code<br>
creates problem when debugging, for example, because you can't step<br>
through a macro invocation.<br>
<br>
One of the main reasons that was presented for not being able to<br>
replace the preprocessor with something that works at the lexical<br>
level is that records would need to be first made first-class citizens<br>
(as frames or whatever). I don't understand why that is -- the<br>
preprocessor doesn't do anything with records, their expansion is done<br>
later, by the compiler. Could someone comment on that, please?<br>
<br>
Is this issue a "definitely no-no" for OTP, or would it be considered<br>
if we can come up with a solution that doesn't break anything?<br>
<br>
<aside><br>
Stepping through the code in the debugger is being thwarted even by<br>
the use of parse transforms. This could be handled by letting the<br>
debugger reconstruct the source it shows from the parsed<br>
representation and not from the source file.<br>
</aside><br>
<br>
best regards,<br>
Vlad<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div></div>