Idea about deferred slots

Mildred Ki'Lya ml.mildred593 at gmail.com
Thu Sep 10 17:32:33 UTC 2009


On 09/10/2009 12:59 PM, Damien Bouvarel wrote:
> Hello,
>
> I think Lisaac has a "software-engineering" problem with deferred slots.
> The deferred slots are usefull for polymorphism, they are meant to be redefined in child prototypes (lower in type hierarchy), right?
>
> 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.
> 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.
> So my question is: is it possible/interesting for the compiler to detect the "deferred call"? like the "call on NULL".
>   
Doesn't Lisaac already do that with the -all-warnings flag ?
I don't know now, but I think it did that in the past.

But I have no idea how the compiler knows if the slot is deferred or not.

> The changes could be:
> - deferred <- `18`;
> or
> - deferred:E <- (`18` ; NULL);
>   
The second solution won't work I think. You can't return generic types
that do not appear in arguments I think.

Now, I want to comment on that because I think that adding lisaac
internals for that kind of feature could be useful. It doesn't expand
the minimalistic core language.



Along those lines, I was also thinking that we could add a keyword
before the type of slots arguments to tell we don't want NULL values
there. That would be checked at compile time and would drasticly reduce
the call on NULl runtime crashs.
But perhaps that's not necessary with -all-warning :)

Mildred :)

-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr>           GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20090910/95de6d2b/attachment.pgp>


More information about the Lisaac-devel mailing list