Idea about deferred slots

Pierre-Alexandre Voye ontologiae at gmail.com
Wed Oct 14 10:12:07 UTC 2009


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"
So we could have an interface mechanisme without a new key word...

2009/9/10 Damien Bouvarel <damien.bouvarel at gmail.com>

>
>
> 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
>>
>>
>>
>
> _______________________________________________
> Lisaac-devel mailing list
> Lisaac-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/lisaac-devel
>
>


-- 
---------------------
Isaac Project - http://isaacproject.u-strasbg.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091014/f1e85d03/attachment.htm>


More information about the Lisaac-devel mailing list