[erlang-questions] mutable state

Olivier BOUDEVILLE olivier.boudeville@REDACTED
Mon May 12 15:36:54 CEST 2014

Hello all,

Sorry for this shameless plug, but there is at least one option very 
similar to what is mentioned in the various exchanges: WOOPER (

State management, some kind of polymorphism and multiple inheritance are 

This version is pretty ancient, but we can share more recent versions 
thereof (still in the 1.x branch) that we use on a daily basis and are 
rather satisfactory despite their simplicity.

Maybe a bit later we will be able to share the versions in the newer 
WOOPER 2.x branch, based on a parse-transform and maps, adding passive 
instances (term-based, instead of process-based), featuring attribute and 
method qualifiers, inheritance-aware build system, a bit of tooling (to 
generate UML-like diagrams), etc. 

Hope this helps,
Best regards,

Olivier Boudeville

EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France
Département SINETICS, groupe ASICS (I2A), bureau B-226
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47 
65 27 13

Envoyé par : erlang-questions-bounces@REDACTED
12/05/2014 07:00

Re: [erlang-questions] mutable state

On second thought, the obvious and natural way to model
objects in Erlang is as processes.

An object executes

loop(Var1, Var2, ..., Varn) ->
        {selector,Arg...} ->
            do some stuff,
            loop(Var1', Var2', ..., Varn')
      ; ...

This is pretty much what Hewitt's actors did, and pretty much
what an early version of Smalltalk did.

You get objects with identity and state; you get synchronous
and asynchronous message sends; you get *distributed* objects.
The one thing you do not get is classes, although delegation is
easy to arrange.

However, inheritance is simply a way of *writing* OO programs;
there doesn't have to be anything analogous to inheritance
happening at run time.

(Come to think of it, you *could* have classes and inheritance.)

erlang-questions mailing list

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140512/a242032c/attachment.htm>

More information about the erlang-questions mailing list