langage Go de google

matthieu herrmann lisaac.herrmann at gmail.com
Fri Nov 13 09:51:10 UTC 2009


Bonjour,
« le soupçon d'aspect avec les contrats » : en fait, c'est plus qu'un
soupçons,  pas que pour les contrats :
dans les crochets, tu peux mettre n'importe quel code lisaac, pas que des
contrats ! Et c'est hérité automatiquement par les fils (sauf si
redéfinition, il faut alors ajouter les fameus «...»).

Hello,
You can have aspect programming with lisaac : everything put in [ ] before
and after the code of a slot is automatically inherited by slot redefinition
in children, while such parts ( the "[] " parts) are not redefined. If it is
the case, you cadd add the famous "..." for inheriting code.

========================================

PARENT :
foo <-
[
LOG.addlast "this is not a contract" ;
]
{/*cool stuff*/}
[
]

// -> in the log you have :
// "this is not a contract"

========================================

CHILD inherit PARENT :
foo <-
{/*child cool stuff*/

// -> in the log you have :
// "this is not a contract"

========================================

CHILD2 inherit PARENT :
foo <-
[...
LOG.addlast "I said : this is not a contract !" ;
]
{/*cool stuff 2*/}

// -> in the log you have :
// "this is not a contract"
//"I said : this is not a contract !"

========================================

Ok, it's not really about GO, but it is for make things clear about [ ]  ;)
(and from what i read, we have got this, they do not, yepeeee)

Matthieu Herrmann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091113/eaa7afde/attachment-0001.htm>


More information about the Lisaac-devel mailing list