There's another mistake with deffered in Lisaac : We haven't virtual and mixin prototype in Lisaac, so we haven't interface like in Java. Interfaces are essentials in large project (>15 developpers), so put a primitive in the compiler could be great, because we could add a switch ine the compiler which verify the prototype which inherit from prototype with deffered, implements correctly the "interface"<br>
So we could have an interface mechanisme without a new key word...<br><br><div class="gmail_quote">2009/9/10 Damien Bouvarel <span dir="ltr"><<a href="mailto:damien.bouvarel@gmail.com">damien.bouvarel@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div class="gmail_quote"><div class="im"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On 09/10/2009 12:59 PM, Damien Bouvarel wrote:<br>
> Hello,<br>
><br>
> I think Lisaac has a "software-engineering" problem with deferred slots.<br>
> The deferred slots are usefull for polymorphism, they are meant to be redefined in child prototypes (lower in type hierarchy), right?<br>
><br>
> The problem is what happen if the programmer forget to redefine a deferred slot? Currently the program crash at runtime with a "Slot deferred" msg.<br>
> Imagine you inherit/expand a big prototype (like ABSTRACT_BITMAP), with deferred slots, there is no way to prove you quickly that you implemented all the deferred slots.<br>
> So my question is: is it possible/interesting for the compiler to detect the "deferred call"? like the "call on NULL".<br>
><br>
</div>Doesn't Lisaac already do that with the -all-warnings flag ?<br>
I don't know now, but I think it did that in the past.<br>
<br>
But I have no idea how the compiler knows if the slot is deferred or not.<br>
<div><br></div></blockquote></div><div><br>Ok i didn't know the compiler could do all this :) Good!<br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
> The changes could be:<br>
> - deferred <- `18`;<br>
> or<br>
> - deferred:E <- (`18` ; NULL);<br>
><br>
</div>The second solution won't work I think. You can't return generic types<br>
that do not appear in arguments I think.<br>
<br></blockquote></div><div>Yes... it can't work. By the way i tried and it segfault.<br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Now, I want to comment on that because I think that adding lisaac<br>
internals for that kind of feature could be useful. It doesn't expand<br>
the minimalistic core language.<br>
<br></blockquote></div><div>Yes! it was the idea, but if it already do it, good to know thanks! <br><font color="#888888">Damien<br></font></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Along those lines, I was also thinking that we could add a keyword<br>
before the type of slots arguments to tell we don't want NULL values<br>
there. That would be checked at compile time and would drasticly reduce<br>
the call on NULl runtime crashs.<br>
But perhaps that's not necessary with -all-warning :)<br>
<br>
Mildred :)<br>
<font color="#888888"><br>
--<br>
Mildred Ki'Lya<br>
╭───────── mildred593@online.fr ──────────<br>
│ Jabber, GoogleTalk: <<a href="mailto:mildred@jabber.fr" target="_blank">mildred@jabber.fr</a>><br>
│ Website: <<a href="http://ki.lya.online.fr" target="_blank">http://ki.lya.online.fr</a>> GPG ID: 9A7D 2E2B<br>
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B<br>
<br>
<br>
</font></blockquote></div></div><br>
<br>_______________________________________________<br>
Lisaac-devel mailing list<br>
<a href="mailto:Lisaac-devel@lists.alioth.debian.org">Lisaac-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/lisaac-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/lisaac-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>---------------------<br>Isaac Project - <a href="http://isaacproject.u-strasbg.fr/">http://isaacproject.u-strasbg.fr/</a><br>