<div>Many thanks for all the excellent explanations. Mats, can you explain a bit more on following?</div>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"></span> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">"In this respect, proplists or dicts are much better if you can live with the (modest) performance hit."</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></p>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>kaiduan</div>
<div><br> </div>
<div><span class="gmail_quote">On 1/5/09, <b class="gmail_sendername">mats cronqvist</b> <<a href="mailto:masse@kreditor.se">masse@kreditor.se</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">"Kaiduan Xie" <<a href="mailto:kaiduanx@gmail.com">kaiduanx@gmail.com</a>> writes:<br><br>
> Hi,<br>><br>> OTP Design principles talks a lot on how to do release handling. However it<br>> does not discuss the case where .hrl file is updated. For example, how to deal<br>> the the following cases?<br>
> 1. A new record is added,<br>> 2. An element is removed/added from an existing record,<br>> 3. A value of macro is changed.<br><br>included files (the .hrl suffix is just a convention) are inserted<br>in the .erl file by the compiler. recompiling/reloading all .erl<br>
files that include your .hrl will cover the easy cases, i.e. when no<br>process has the old version of the record/macro on the stack/in a<br>register.<br><br>this is why all long-lived processes should be gen_servers; you can<br>
use the code_change method to transform the state. but no matter how<br>you do it, the combination records-upgrades will always suck. in<br>this respect, proplists or dicts are much better if you can live<br>with the (modest) preformance hit.<br>
<br>mats<br></blockquote></div><br>