Jonathan Lindegaard Starup
Jonathan Lindegaard Starup
> You want an immutable one? But does that even exist? Yes, both with fancy and simple implementation https://www.scala-lang.org/api/2.12.3/scala/collection/immutable/HashMap.html
And meanwhile - progress monomorpher by "ignoring" it, relying on unwritten invariants
I agree with that but also want to say that `Debug[Array[t]]` can be defined, so even without those its better than `ToString`
Debug is a work-in-progress tool for users, so its not in the library no. I vote that a trait-based alternative is started, which can then be expanded as the trait...
> Also whats the gain right now? How about we just remove stringify with no replacement? It is - to me - unusable that mutable structures cannot be printed. Arrays,...
Yea yea no rush on any of this 😊 > On the other hand, breakages everywhere. It seems like a good step to me but im also curious about the...
@magnus-madsen one reason to separate Debug and ToString is also the case of String. `debug("hi ")` should probably be `"hi\t"` (with quotes on it) while `toString("hi ")` probably has to...
> Can we start by removing Debug.stringify? I think its nice to replace it first. Otherwise there is no way to debug mutable things in the interim > (And all...
> What is wrong with dprintln(MutSet.join(xs)) by the way? Only works when elements have `ToString`, which mutable things doesn't (just writing again here for completeness)
> Adding ToString to everything is not sufficient because we'd have to declare a ToString constraint to use debug on anything polymorphic I'd be okay with having `ToDebugString[t]` as long...