Content deleted Content added
→scala doesn't have algebraic data types: new section Tags: Mobile edit Mobile web edit |
|||
Line 378:
The article says scala has algebraic data types, but I think that's misleading. It doesn't have native support for them in the way that Haskell or Rust does. Instead They are sort of simulated by case classes. Agreed? Article should be edited accordingly? [[User:Myrmornis|Myrmornis]] ([[User talk:Myrmornis|talk]]) 13:25, 4 February 2022 (UTC)
For Scala 2 I think the claim was perhaps debatable, but with Scala 3's `enum` algebraic data types are directly and unambiguously supported, IMO. See https://docs.scala-lang.org/scala3/reference/enums/adts.html [[User:SethTisue|SethTisue]] ([[User talk:SethTisue|talk]]) 19:01, 20 February 2022 (UTC)
|