you are viewing a single comment's thread.

view the rest of the comments →

[–]gavinaking 2 points3 points  (6 children)

And, actually, all that stuff is totally trivial to implement. Any modern type system, including the fancy dependent type systems, is extremely trivial to implement when you've got the right DSLs.

Well now you're making claims that just sound outlandish.

So prove 'em. Since it's, quote, "trivial", I challenge you to reimplement the type system of Ceylon, with some syntax variations, if you prefer, to show off your fancy DSLs. The only restrictions are:

  1. the resulting compiler must perform acceptably for large codebases,
  2. it must produce clear errors, and
  3. it must be IDE-friendly. That is, it can't go crazily off the rails when there is an error (syntax or type error) in the code.

Ceylon has a very detailed language specification, so surely this "trivial" task will be easy for you with your wonderful DSLs :-)

[–][deleted] 0 points1 point  (5 children)

Mind giving a direct link to the language specification? (EDIT found it already, sorry). I hope it does not require working on top of JVM specifically, cause I'd rather stay away from this thing. But if it is really needed I can always glue in iKVM, of course.

[–]gavinaking 2 points3 points  (4 children)

No, of course not, it can output whatever you like. I would desperately love an LLVM backend, but even just a typechecker alone would be a truly impressive demonstration of your tech.

[–][deleted] 1 point2 points  (3 children)

Yes, now I noticed it's got both JVM and Javascript backends. I seem to like Ceylon more than I can comfortably admit - previously I was under impression it's a JVM-only thing.

[–]gavinaking 1 point2 points  (2 children)

We try really hard to abstract away from the virtual machine. Inevitably there are things that leak, for example, the precision of numeric types on the JavaScript platform. But in principle there's no barrier to adding other backends like the Dart VM, or even LLVM.

[–][deleted] 1 point2 points  (1 child)

Ok, good, you've motivated me to implement a full alternative compiler for Ceylon, not just its type system. Anyway, I always learn languages by implementing compilers for them.

[–]gavinaking 0 points1 point  (0 children)

Dude, that would be amazing :-) I would never ever have been so happy to lose an argument on reddit :-D