-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.WHICH doesn't distinguish identically-named classes #5569
Comments
From zefram@fysh.org
I've constructed two different classes here, each locally named "Aa". -zefram |
From @zoffixznetThere's a bit of confusion here in that (I'm assuming) REPL uses a .say or something similar to output the values. So when it output your list, it looked the same, but .WHICH doesn't return strings, but rather ObjAt objects. Even thought they get stringified to the same value via .gist, they are distinct objects and .WHICHes of different-yet-same-named objects are different and do not produce any conflicts, such as in === comparisons: �<�Zoffix�>��� m: my You can see the returned ObjAt objects are different if you output their .WHERE addresses: �<�Zoffix�> ���m: say ({ my class Aa { has With that said, I'm rejecting this ticket. One can argue such ObjAt have to stringify to different values, but I'm failing to see the need to do so. If I'm wrong, please let me know and I'll reopen. |
The RT System itself - Status changed from 'new' to 'open' |
@zoffixznet - Status changed from 'open' to 'rejected' |
From zefram@fysh.orgZoffix Znet via RT wrote:
That kind of comparison distinguishes ObjAt values that *are* meant to
So in both these cases, the 3s and the classes, the ObjAt values are doc/Type/ObjAt.pod says # If two objects compare equally via C<===>, their C<.WHICH> methods return So in the above case with 3s it implies that these ObjAt objects are
I believe you're wrong and this needs to be reopened. It appears that Furthermore, as far as I can see the string is the entire content of an -zefram |
From zefram@fysh.orgI wrote:
Additional:
This seems to confirm that the string is the thing that matters. -zefram |
From @zoffixznetReopened. |
@zoffixznet - Status changed from 'rejected' to 'open' |
From zefram@fysh.orgAdditional additional phenomena:
Looks like the Set class is using .WHICH strings, not === or anything -zefram |
From zefram@fysh.orgThere was an attempt to fix this in 4d85cde9, and it does avoid clashes
-zefram |
From zefram@fysh.orgThere was another attempt to fix this in 1b898c81, which does prevent
-zefram |
Migrated from rt.perl.org#128931 (status was 'open')
Searchable as RT128931$
The text was updated successfully, but these errors were encountered: