pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Implements optional strict symbol comparison in P12

Open carolahp opened this issue 2 years ago • 0 comments

[This is a draft PR, do not review yet please]

Seeks to solve the issue https://github.com/pharo-project/pharo/issues/12420

Currently in Pharo, the result of comparing a symbol and a string with the same contents is true. For example: #hello = 'hello' returns true.

This PR seeks to implement "strict" comparison of strings and symbols, meaning that the previous example should return false

For this:

  • first (to prevent system crashes) we must fix all comparisons between strings and symbols from Pharo's core, replacing them by symbol/symbol comparisons
  • secondly, we must modify the comparison methods to make them 'strict' depending on a configuration setting
image

carolahp avatar Aug 20 '23 20:08 carolahp