Some kind of anonymous case class in Scala instead of using a tuple would be awesome.
-
Show this thread
-
Or maybe we can call it a named tuple?
1 reply 0 retweets 0 likesShow this thread -
Replying to @tanin
what would the difference be between a named tuple/anon case class, tuple, and regular class class, in your mind? the line between a tuple and a case class is pretty thin from a user's standpoint to me, though the latter has more stuff (like .copy)
1 reply 0 retweets 1 like -
Replying to @oacgnol
Stylistic, mostly. val tuple = (name="test", payment="something") and use tuple.payment ... instead of tuple._2. We could've created a case class. Then, we would have to name it. I would have name it NameAndPayment... which isn't a good name. It feels too "adhoc".
1 reply 0 retweets 0 likes
Replying to @tanin
ah right, that does sound kinda neat!
11:19 AM - 16 Apr 2020
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.