On 13 Apr 2011 21:52, "Rémi Forax" <[email protected]> wrote: > > On 04/13/2011 07:02 PM, James Iry wrote: >> >> "New" in an absolute sense is very hard to achieve and is rarely a goal of language design other than in being a new way to synthesize old things. Scala has almost nothing new in it. Two of its most novel features, higher kinded types and implicits (which aren't in Ceylon), have prior art. I seem to vaguely recall that the only genuinely new thing in Scala is path dependent typing. >> >> That said, there are some things in Ceylon which are pretty rare and, as far as I know, are "new" to the Java-like world. The biggest thing that stood out for me is union types. Java actually has a very limited form of union typing in its rules for checked exceptions, but it's so limited that it's hard to recognize and it's certainly not generally usable. Scala (and many statically typed functional languages like Haskell and ML) can emulate union types using algebraic data types, of course, but it takes a bit of ceremony to create an ADT around the union. Somebody told me that Typed Racket (a typed descendant of Scheme) has union types, but that's obviously way way off the mainstream. > > > Ok, call me stupid but I don't see the difference between Ceylon union types and > Scala case classes and pattern matching: > http://www.scala-lang.org/node/107 > >
Pattern matching is a far, far deeper concept. You can pattern match on types, case classes, collections, or indeed anything with an unapply or unapplySeq method defined (regexes are a good example of this) Pattern matching also underlies the catch block in exception handling, and is used in places that aren't immediately obvious, for example: val (a, b) = methodReturningATuple Is actually a pattern match. >> >> I'm also curious exactly what they meant by "modules" and "metaprogramming", two words that are heavily overloaded and mean many different things to different people. > > > > Rémi > >> >> On Wed, Apr 13, 2011 at 9:21 AM, Rémi Forax <[email protected]> wrote: >>> >>> On 04/13/2011 06:12 PM, Kevin Wright wrote: >>>> >>>> >>> >>> The only things which is new is the syntax for annotation (without @). >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups "JVM Languages" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to [email protected]. >> For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups "JVM Languages" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to [email protected]. > For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en. -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en.
