Tricky case
matthieu herrmann
lisaac.herrmann at gmail.com
Fri Nov 13 10:30:55 UTC 2009
This must be a compile time error.
Use Strict SELF instead.
By the way, it's a typing holme (trou de typag) : the compiler can not
always check this at compile time. It's a bug we worked on for a whole night
(whitout finding it, Ben solves it the next day ;) ), and you will have to
use Strict SELF in the next release (not sure but, by the way, use Strict)
2009/11/11 Pierre-Alexandre Voye <ontologiae at gmail.com>
> I always vote for compile time error. If you like runtime errors, ruby is a
> very good language
>
> 2009/11/11 Mildred Ki'Lya <ml.mildred593 at gmail.com>
>
>> Hi,
>>
>> I wanted your opinion in what should happen in that case:
>>
>>
>> Section Header
>> + name := OBJECT;
>> Section Public
>> - Self:SELF '==' other:SELF :BOOLEAN <- deferred;
>>
>> Section Header
>> + name := APPLE;
>> Section Inherit
>> - parent_object :OBJECT := OBJECT;
>> Section Public
>> - Self:SELF '==' other:SELF :BOOLEAN <- color == other.color;
>> + color :COLOR;
>>
>> Section Header
>> + name := ORANGE;
>> Section Inherit
>> - parent_object :OBJECT := OBJECT;
>> Section Public
>> - Self:SELF '==' other:SELF :BOOLEAN <- size == other.size;
>> + size :INTEGER;
>>
>> Section Header
>> + name := MAIN
>> Section Public
>> - main <-
>> ( + o1, o2 :OBJECT;
>> (o1, o2) := (APPLE, ORANGE);
>> (o1 == o2).println;
>> );
>>
>>
>> What should be the result of this ?
>>
>> 1. Compile time error
>> 2. Runtime error "slot deferred" (OBJECT.'==')
>> 3. FALSE
>> 4. TRUE
>> 5. random result
>>
>>
>> I would vote for (2) but is that behaviour specified anywhere ?
>>
>> Mildred
>>
>> --
>> Mildred Ki'Lya
>> ╭───────── mildred593@online.fr ──────────
>> │ Jabber, GoogleTalk: <mildred at jabber.fr> <mildred at jabber.fr>
>> │ Website: <http://ki.lya.online.fr> <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/
>
> _______________________________________________
> Lisaac-devel mailing list
> Lisaac-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/lisaac-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091113/ecd331b4/attachment.htm>
More information about the Lisaac-devel
mailing list