On 04/13/2011 11:14 PM, Kevin Wright wrote:
On 13 Apr 2011 21:52, "Rémi Forax" <[email protected]
<mailto:[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)
Usually language starts with a simple type matching and ends up with
pattern matching,
Pizza [1] a Scala ancestor has the same kind of type matching as Ceylon
has now.
Rémi
[1] http://en.wikipedia.org/wiki/Pizza_%28programming_language%29
--
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.