These are chat archives for mdedetrich/scala-json-ast

2nd
Dec 2016
Matthew de Detrich
@mdedetrich
Dec 02 2016 13:59
@dwijnand Regarding your issue with unsafe.JObject() == unsafe.JObject(), I am fairly sure this is due to underlying array equality
Dale Wijnand
@dwijnand
Dec 02 2016 14:00
yeah I know
Matthew de Detrich
@mdedetrich
Dec 02 2016 14:00
So its an open question whether we should implement proper equality or not
Personally I am on the fence about this, but there is a reason why unsafe is called unsafe
Dale Wijnand
@dwijnand
Dec 02 2016 14:01
well even unsafe is safe in some sense
Matthew de Detrich
@mdedetrich
Dec 02 2016 14:02
Well I will document it for now, but I am opening to change it. I mean you can argue either way, the equality of JObject is mirroring the equality of the underlying data structure
Arguably if you are doing something like that, you should be using the safe version
Which will work fine in regards to equality
Dale Wijnand
@dwijnand
Dec 02 2016 14:05
then you should document what the threshold is for things that are "something like that", so one can understand what to expect and not expect out of the "unsafe" versions.
btw I found this by simply writing a test case asserting the result of deserialising, and it was failing because 2 JObjects weren't ==
Matthew de Detrich
@mdedetrich
Dec 02 2016 14:07
Yeah of course, Its just something I forgot
Will add it into the documentation and also in the source code as a comment today
Dale Wijnand
@dwijnand
Dec 02 2016 14:09
btw you might want to update the room description
Matthew de Detrich
@mdedetrich
Dec 02 2016 14:35
@dwijnand Ah, thanks for reminding me!