> On 6 Mar 2017, at 14:12, Ben Coman <btc@openinworld.com> wrote:
>
>
>
> On Mon, Mar 6, 2017 at 5:54 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
> Here is a concrete proposal:
>
> https://pharo.fogbugz.com/f/cases/19802/Make-sure-Symbol- concatenation-results-in-a- Symbol-not-a-String
>
> This gives the following assertions:
>
>�� �� �� �� ��"Concatenating 2 symbols results in abother symbol"
>�� �� �� �� ��self assert: (#foo , #bar) == #foobar.
>
>�� �� �� �� ��"Concatenating the empty symbol does not change a symbol"
>�� �� �� �� ��self assert: (#foo, emptySymbol) == #foo.
>�� �� �� �� ��self assert: (emptySymbol, #foo) == #foo.
>
>�� �� �� �� ��"Strings and symbols can still be mixed, the receiver determines the result type"
>�� �� �� �� ��"Symbol receiver gives symbol result"
>�� �� �� �� ��self assert: (#foo , 'bar') == #foobar.
>�� �� �� �� ��"String receiver gives string result"
>�� �� �� �� ��self deny: ('foo' , #bar) == #foobar.
>�� �� �� �� ��self assert: ('foo' , #bar) equals: #foobar.
>�� �� �� �� ��self assert: ('foo' , #bar) equals: 'foobar'.
>
>
> Those last two seem contradictory.
No, Symbols and String can be used interchangeably in Pharo in lots of contexts. Particularly when comparing them, it makes no difference, all the following are/have always been true, independent of this change:
��#foo = 'foo'
��'foo' = #foo
��#foo = #foo
��'foo' = 'foo'
But maybe it is a bit confusing with an extra comment.