<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Maybe an example would help.<div class=""><br class=""></div><div class="">This is the riak_object from Basho’s riak and it is an encapsulated record with exported types and transactional functions that operate on the opaque object:</div><div class=""><a href="https://github.com/basho/riak_kv/blob/develop/src/riak_object.erl" class="">https://github.com/basho/riak_kv/blob/develop/src/riak_object.erl</a></div><div class=""><br class=""></div><div class="">It is written like this because it is passed around the whole system and persisted to the metal, so opacity and forward/backward changes need to be able to be dropped into the code base with rewriting *everything*</div><div class=""><br class=""></div><div class="">Gordon</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 10 juil. 2015 à 16:05, Lloyd R. Prentice <<a href="mailto:lloyd@writersglen.com" class="">lloyd@writersglen.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class="">Thanks Jesper and to all who have so generously responded.<br class=""><br class="">Jesper, can you please expand on the following:<br class=""><br class="">"Generally you want to avoid module 'foo' to contain getter/setter pairs and define the "transactional" states that can happen to 't'."<br class=""><br class="">Where would one define getter/setter pairs? What do you mean by "transactional" states?<br class=""><br class="">Many thanks,<br class=""><br class="">Lloyd<br class=""><br class=""><br class="">Sent from my iPad<br class=""><br class=""><blockquote type="cite" class="">On Jul 10, 2015, at 7:25 AM, Jesper Louis Andersen <<a href="mailto:jesper.louis.andersen@gmail.com" class="">jesper.louis.andersen@gmail.com</a>> wrote:<br class=""><br class="">Generally you want to avoid module 'foo' to contain getter/setter pairs and define the "transactional" states that can happen to 't'.<br class=""></blockquote>_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></body></html>