[erlang-questions] Exporting a record type
Fri Jul 10 17:18:19 CEST 2015
Maybe an example would help.
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:
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*
> Le 10 juil. 2015 à 16:05, Lloyd R. Prentice <lloyd@REDACTED> a écrit :
> Thanks Jesper and to all who have so generously responded.
> Jesper, can you please expand on the following:
> "Generally you want to avoid module 'foo' to contain getter/setter pairs and define the "transactional" states that can happen to 't'."
> Where would one define getter/setter pairs? What do you mean by "transactional" states?
> Many thanks,
> Sent from my iPad
>> On Jul 10, 2015, at 7:25 AM, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:
>> Generally you want to avoid module 'foo' to contain getter/setter pairs and define the "transactional" states that can happen to 't'.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions