Note that we’re talking really about IO::Path objects here, which is what .IO generates.
And in that context, I think an object $a with a given abspath, would be eqv to $b with the same abspath. Because that *is* the identifier on a file system, is it not? Liz ================= > On 05 Sep 2015, at 17:03, Bart Wiegmans <bartwiegm...@gmail.com> wrote: > > I kind of think that's impossibly complex. What does it even mean for IO > objects to be value-equal? They represent unknowns in any case. Even if they > resolved to the same file, they might be read at different times and have > different contents. Or a write to one object may succeed and another may not. > No, I don't think IO should be a value object. > > Bart > > 2015-09-05 16:14 GMT+02:00 Elizabeth Mattijsen <l...@dijkmat.nl>: > > On 05 Sep 2015, at 16:06, dakkar (via RT) <perl6-bugs-follo...@perl.org> > > wrote: > > > > # New Ticket Created by dakkar > > # Please include the string: [perl #125998] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org/Ticket/Display.html?id=125998 > > > > > > > This:: > > > > '/tmp'.IO eqv '/tmp'.IO > > > > returns ``False``. > > > > Is this correct? Should IO behave like value objects? > > > > Possible problems: > > > > - two IO referring to non-existent paths: should they compare like > > their string representation? or always be different? or what? > > - ``/tmp`` and ``/tmp/``: should they compare as equal? should we > > ``.resolve`` them before comparing? > > If they should work as value objects, they should probably compare .abspath. > > > > Liz >