Tricky case

Pierre-Alexandre Voye ontologiae at gmail.com
Wed Nov 11 19:59:22 UTC 2009


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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091111/26de3c61/attachment.htm>


More information about the Lisaac-devel mailing list