Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a bit of hyperbole, sure, but I think there's some truth in it. For many of these, the progress is pretty slow - starting with simple type inference, lambdas. OCaml has imperative/OO features but it is still an ML language. As other languages adopt many of the ML features they will retain their roots of course. But I'd like to think they'll accumulate all of the good parts of an ML language (pattern matching, better inference). It's possible that my belief that ML languages are far superior to popular languages could be influencing my outlook. But even after many years of programming in terrible languages like Java it's clear within a week of programming in OCaml/ML that so many problems that require "architecting" in Java/ObjC/C++ are just trivial chains of functions and pattern matching in OCaml. How could the FP paradigm (ML in particular) not prevail? I can't imagine a world where it doesn't.


But none of these languages will ever adopt Hindly-Milner type inference, which is the staple of the ML family. I mean, you have fist class functions and pattern matching in Erlang, and a library for pattern matching in Clojure, but this doesn't make them members of the ML family. And I really don't see Java and friends evolving much beyond that.


Honest question: Why would/could they not? There has been a ton of research published on extending HM type inference to support structural subtyping, row polymorphism, extensible records which very closely model many (but not all) of the concepts in Object Oriented systems.


That's actually a good question. I suppose that it would be possible in theory to try and reconcile the two, but I don't see that happening. And I don't know how much you can extend HM to support the full C++ featureset. I'd be surprised if it was possible.


I haven't seen the entirety of C++'s feature set added to an HM system, but even OCaml has an OO system that's fairly complete. Many new functional languages are adopting Daan Leijen's extensible records approach which can model OO fairly well. http://research.microsoft.com/pubs/65409/scopedlabels.pdf

All of these are extensions of ML that are shipped into production today, so it looks like more than just a theory at this point.


It looks like Apple just released Swift two weeks after my original comment/prediction. Does this change your mind?


Not full-on Hindly-Milner, of course, but it seems like C++11's auto is a move in that direction.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: