Closed
Description
https://github.com/scala/docs.scala-lang/blob/main/_overviews/scala3-book/taste-collections.md
I just intuitively tried if tuple apply
works with static indices, and it does, which is very cool. I don't know if that should be the preferred way to access them? I.e. instead of
case class Person(name: String)
val t = (11, "eleven", Person("Eleven"))
t._1 // 11
t._2 // "eleven"
t._3 // Person("Eleven")
would it be better to write
t(0) // 11
t(1) // "eleven"
t(2) // Person("Eleven")
?
<
4A11
/div>
Metadata
Metadata
Assignees
Labels
No labels