Perhaps interestingly, in the original Self paper promoting mirrors,
it was argued that one of the lessons learned of using mirrors in self
was that '==' is really a reflective property, that should be
accessible only through mirrors. That is because, whether or not two
pointers are equal is really a question on the VM level, and not on
your business level.

Niko


On Mon, Sep 27, 2010 at 10:32 AM, Johan Brichau <[email protected]> wrote:
> I convinced the teacher who will be taking over my Smalltalk courses at 
> UCLouvain (starting this week) to use Pharo :-)
> One of the introductory exercises in these courses shows the difference 
> between '==' and '='. However, in Pharo (&Squeak) the following goes wrong 
> imho:
>
> 'a' == 'a' -> true
> $a asString == $a asString -> false
>
> It seems that when you evaluate the expression, the (semantically identical) 
> strings are represented as the same literal in the compiled block.
> For example, try to evaluate the following code by evaluating each statement 
> in a separate doit. Then do it again as a single block...
>
> |a b|
> a := 'a'.
> b := 'a'.
> a == b inspect
>
>
> Do I make it an issue? Is there already an issue? (did not find one)
> Am I wrong?
>
> Johan
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
http://scg.unibe.ch/staff/Schwarz
twitter.com/nes1983
Tel: +41 076 235 8683

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to