odersky

Results 363 comments of odersky

I don't see why Scala should be different from Java here. If you need a different hashcode it's very easy to compute it from oridinal.

@lrytz We can't change `toString` since named tuples are to tuples. We should seriously start with implementing a general `Show` typeclass to address these issues. I don't know how to...

Some new comments on the older thread on subtyping: https://github.com/lampepfl/dotty/pull/19075#issuecomment-1853114959 My recommendation is that we want to be very flexible with tuple convertibility, mirroring what other languages do. So we...

> Shouldn't it be a union of both types (a1: A, b1: B) | (a2: A, b2: B) or widened to NonEmptyTuple? Actually, widened to `AnyNamedTuple`, with my last commit....

@sjrd After rebasing to the new match type implementation, I get this: ``` [error] -- [E191] Type Error: /Users/odersky/workspace/dotty/library/src/scala/NamedTuple.scala:107:36 [error] 107 | type Names[X n [error] -- [E191] Type Error:...

Thanks for the explanation! I'll try that. It would be good to work on the error diagnostics so that one could suggest fixes like this automatically.

I used scala> import language.experimental.namedTuples Does not work in sbt console. > Experimental features may only be used with a nightly or snapshot version of the compiler 1 error found...

@bishabosha All remarks should be addressed now.

From my side all is done. Ready to merge?