Bonjour,<br>« le soupçon d'aspect avec les contrats » : en fait, c'est plus qu'un soupçons, pas que pour les contrats :<br>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 «...»).<br>
<br>Hello,<br>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.<br>
<br>========================================<br><br>PARENT : <br>foo <- <br>[<br>LOG.addlast "this is not a contract" ;<br>]<br>{/*cool stuff*/}<br>[<br>]<br><br>// -> in the log you have :<br>
// "this is not a contract"<br><br>========================================<br><br>CHILD inherit PARENT : <br>foo <-<br>{/*child cool stuff*/<br><br>// -> in the log you have :<br>// "this is not a contract"<br>
<br>========================================<br><br>CHILD2 inherit PARENT :<br>foo <-<br>[...<br>LOG.addlast "I said : this is not a contract !" ;<br>]<br>{/*cool stuff 2*/}<br><br>// -> in the log you have :<br>
// "this is not a contract"<br>//"I said : this is not a contract !"<br><br>========================================<br><br>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)<br>
<br>Matthieu Herrmann<br><br>