<div dir="ltr">Well is so uncommon and subjective that this approach even make it to the <a href="http://www.erlang.se/doc/programming_rules.shtml#HDR13">http://www.erlang.se/doc/programming_rules.shtml#HDR13</a><div><br></div><div>Making fixtures, keeping related things together and using processes for an initiating clean state are best practices in Erlang. PropEr doesn't follow those principles. Sentences like " the whole issue is about something which is not functional in the first place" is not helping. "If you find it disturbing, then simply write functional code." I would like to, but I found this issue dealing with digraph module form OTP stdlib!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 9:03 PM, Kostis Sagonas <span dir="ltr"><<a href="mailto:kostis@cs.ntua.gr" target="_blank">kostis@cs.ntua.gr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/26/2015 08:02 PM, Hynek Vychodil wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You just can't make simple and reliable clean up embedded in wrapper<br>
macro or function. You always have to make explicit ugly procedural code<br>
<br>
Objs = init(),<br>
run(),<br>
delete(Objs),<br>
test()<br>
<br>
You simply can't make nice clean functional or function like wrapper. It<br>
is ugly, repetitive, error-prone, procedural code. This is wrong.<br>
</blockquote>
<br></span>
I will not comment on the "ugly", "repetitive", "error-prone" and "wrong" characterizations.  As I wrote in my previous message these are not defined objectively.<br>
<br>
However, please realize that the whole issue is about something which is not functional in the first place!  Under this prism, I am not very surprised you cannot, or at least find it difficult to, find a "clean functional" solution...  I would even argue that it is better this way. (I.e., that there is a "penalty" for wanting to test non-functional code.  If you find it disturbing, then simply write functional code.)<span class="HOEnZb"><font color="#888888"><br>
<br>
Kostis<br>
</font></span></blockquote></div><br></div>