<br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">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 class="im"><br></div></blockquote><div><br>Ok i didn't know the compiler could do all this :) Good!<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
> 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>Yes... it can't work. By the way i tried and it segfault.<br> </div><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>Yes! it was the idea, but if it already do it, good to know thanks! <br>Damien<br></div><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">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><br>