News for hackers. Stuff that matters.
Re:Plans for OCaml 4.08 by jonloldrup on Wednesday July 04, 2018 @03:11PM (#17458945)
I'm wondering whether Ceylon could be considered a modern day Ocaml substitute? It has a very strong type system, focus on immutability, a strong module system and Object Oriented capability. What's missing?
Re:Plans for OCaml 4.08 by ms013 on Wednesday July 04, 2018 @04:17PM (#17459263)
Ocaml is a perfectly good modern day language. Our entire codebase at work is built on it and we’re pretty satisfied.
Re:Plans for OCaml 4.08 by sgt on Wednesday July 04, 2018 @03:42PM (#17459078)
I don't think Jane Street would be using OCaml to this extent if it needed a "modern day substitute". And the language is evolving, which is always a healthy sign.
Re:Plans for OCaml 4.08 by jonloldrup on Wednesday July 04, 2018 @04:35PM (#17459319)
Okay, wrong wording. However, Ocaml has several 'warts'. https://news.ycombinator.com/item?id=9583659

I suggested Ceylon as the 'modern day substitute' in the sense that it has had the opportunity to learn from mistakes made by the older FP languages. Ceylon has a very consistent type system and is therefore able to deliver more clear error messages.

Re:Plans for OCaml 4.08 by chillee on Wednesday July 04, 2018 @05:41PM (#17459586)
Since that user didn't specify them, what would you view as these warts?
Re:Plans for OCaml 4.08 by klibertp on Wednesday July 04, 2018 @07:45PM (#17460022)
It has 3 (4?) different, not very compatible stdlibs, for example. Also 3 tools for syntactic extension, two of which suck incredibly, while the last one is pretty new. It has 2 (3 if you count Reason) very different syntaxes defined, even though I've never seen the "light" kind in the wild. The whole String mutability story is interesting in its own right. I'm sure there's a lot more.

But note: every single language has warts like this, especially if it's been developed for a couple of years already. I think OCaml has probably fewer warts than JavaScript, or PHP, or even Java; but more than Go, or Elixir, or Scheme. It's still very nice language and toolchain, though, perfectly usable in many cases - the learning curve may be steep at some points, but on average it's not that hard to learn, and you gain a lot of benefits if you do.

Re:Plans for OCaml 4.08 by yminsky on Wednesday July 04, 2018 @08:59PM (#17460267)
OCaml isn't without its warts (like any language), but I don't quite think you've nailed them.

For one, the different stdlibs are in fact highly compatible. Basic types (option, result, string, int, array, float) are all the same, so code using different stdlibs works together seamlessly most of the time.

Lwt and Async are a different story, and there is a real incompatibility problem there.

The syntax extension story is pretty clear and simple: PPX rules the roost, and the tools for building PPXs are quickly getting better and more unified. Reason is an interesting variant in the ecosystem, but its existence doesn't amount to a wart in my eyes. It's an alternative syntax that you can use interoperably with the rest of the OCaml ecosystem (and Dune makes that awfully easy.)

Re:Plans for OCaml 4.08 by laylomo2 on Wednesday July 04, 2018 @07:56PM (#17460055)
Some clarifications:

It has one standard library, and several alternative standard libraries of varying popularity. I would argue that Core is probably the most popular. For what it's worth, Haskell also has several replacement for its standard library, Prelude.

For the syntax extensions, the community has largely migrated to PPX. Alternatives are being phased out.

String is no longer mutable in recent versions of OCaml. The string type is now immutable, and a new type, bytes, has been introduced which is mutable.

Re:Plans for OCaml 4.08 by 3rdAccount on Wednesday July 04, 2018 @05:19PM (#17459487)
I don't think Ceylon is really in the same category as OCaml. OCaml is closer to F# and Haskell. Ceylon is probably closer to Kotlin.
Re:Plans for OCaml 4.08 by timv on Wednesday July 04, 2018 @09:53PM (#17460432)
I agree with the rest of your comment, but I think this Ceylon is probably closer to Kotlin. is unfair on Ceylon

Kotlin basically has the Java type system with a few extensions, but no substational changes.

Ceylon has its own type system that draws heavily from the FP/ADT style of thinking. It's not OCaml (nor does it want to be), but it's also not Kotlin.

Re:Plans for OCaml 4.08 by ms013 on Thursday July 05, 2018 @03:56AM (#17461585)
Where does it fall relative to Scala?