Hacker News new | ask | show | jobs
by gavinking 4008 days ago
What I'm trying to say is that I don't think that the total complexity or total expressiveness is ultimately much different. You trade class types + interface types for record types + named structural types. You trade class inheritance for record extension. You gain a tiny little bit of flexibility via structural typing - but in my opinion much less than is often claimed, since in all these languages so-called structural types are only partially structural - and you lose some power at the tooling level (refactorings are no longer guaranteed to work). You gain a bit of flexibility by decoupling initialization into a function, but you also gain a bit of verbosity and lose a little bit of modularity.

Ultimately it's a bit of a wash and honestly I would probably be almost as happy with OCaml or Rust or something like that as I am with Ceylon. I think both systems work well and are intellectually consistent. I don't think either is clearly superior to the other.

1 comments

It's highly dependent on coding style. If you program in a mostly ML-like style then I think that design has its advantages because only only need record of functions + open recursion + named + always constructed via some constructor in 1% of cases. In such a style you view that combination as just one combination in a whole spectrum of data types that you can express. However if you want to make a language for object oriented programming it makes sense to build that combination into the language rather than supplying each part as a separate building block that you compose in exactly the same way all the time.
Yeah, I think that's probably right.