String compare

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

String compare

Ulf Kellermann
Hi,

I'll try to refresh my smalltalk knowledge and I don't
understand the behaviour as:

('abc') == ('abc') ==> *should be false* in understanding,
but it is* true?*

Thanks,
Ulf

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: String compare

Gwenaël Casaccio
On 05/07/2013 20:19, Ulf Kellermann wrote:

> Hi,
>
> I'll try to refresh my smalltalk knowledge and I don't
> understand the behaviour as:
>
> ('abc') == ('abc') ==> *should be false* in understanding,
> but it is* true?*
>
> Thanks,
> Ulf
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-smalltalk

Hi,

they are the same because the compiler doesn't duplicate
literals constants.

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk