Idea about deferred slots

Damien Bouvarel damien.bouvarel at gmail.com
Thu Sep 10 18:11:08 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.
>
>
Ok i didn't know the compiler could do all this :) Good!


> > 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.
>
> Yes... it can't work. By the way i tried and it segfault.


> 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.
>
> Yes! it was the idea, but if it already do it, good to know thanks!
Damien

>
>
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20090910/5d5692b1/attachment.htm>


More information about the Lisaac-devel mailing list