News for hackers. Stuff that matters.
Re:Rust in 2018: easier to use by grayrest on Sunday January 14, 2018 @03:33AM (#16143341)
> Ocaml almost fits the bill, but the tooling around it is lacking to put it mildly.

I know the Reason guys want to tackle project setup / build / deps in addition to their syntax changes. I've found the current release's bsb toolchain to work pretty well for js targets but I haven't tried to set it up for native compilation.

Re:Rust in 2018: easier to use by yen223 on Sunday January 14, 2018 @03:47AM (#16143366)
I've built several toy projects with ReasonML. I found the overall experience fairly positive, so please take this comment kindly.

I'm concerned about the ReasonML -> OCaml -> Bucklescript -> JS compilation chain. The laws of leaky abstraction pretty much guarantees this is not a robust way to do things.

I also wished the ReasonML folks started from scratch, instead of inheriting OCaml's baggage (no forward references, a plethora of file types to deal with, no UTF8 strings without bringing in an external lib, and so on).

Re:Rust in 2018: easier to use by xfer on Sunday January 14, 2018 @08:37AM (#16144188)
No builtin utf-8 strings is a good/bad thing is debatable.

You don't need to use bucklescript toolchain to write Ocaml, it has a very good package manager, the build-system tooling is getting better, already has great editor support for many years now(merlin).

I think the tooling scene is much better than Haskell. Not sure what you mean by "no forward references"?

Re:Rust in 2018: easier to use by bjz_ on Sunday January 14, 2018 @10:04AM (#16144495)
> Not sure what you mean by "no forward references"?

I'm guessing they are talking about having implicit mutual recursion between items in a module, like Haskell has.

Re:Rust in 2018: easier to use by yen223 on Sunday January 14, 2018 @02:09PM (#16145691)
> Not sure what you mean by "no forward references"?

I probably got the name wrong, but it's the ability to use a function before it is defined.

In OCaml/ReasonML, you'd have to use the rec keyword and structure your codebase in a particular way to define mutually-recursive functions. It is a small but noticeable papercut, especially since recursion is so common in a functional language.

Re:Rust in 2018: easier to use by botverse on Tuesday January 16, 2018 @05:27PM (#16163331)
May be the word I’d “hoisting”
Re:Rust in 2018: easier to use by phillipcarter on Sunday January 14, 2018 @04:30PM (#16146598)
There's a similar chain for F# running with Fable:

F# code (with a catch) --> F# AST --> Bable AST --> JS

The big thing here is that the F# code you write has slightly different semantics than "normal" F#. That's because the runtime environment is different, and so you can't escape that. Rather than attemp to gloss this over, the Fable creators are pretty explicit about this, including documenting each of the (small) differences. The result is pretty good. Abstractions don't seem too leaky from my vantage point.

Re:Rust in 2018: easier to use by fhars on Sunday January 14, 2018 @09:03AM (#16144272)
There ist no ReasonML -> Ocaml compilation step in that chain, ReasonML is just another syntax for ocaml.
Re:Rust in 2018: easier to use by yen223 on Sunday January 14, 2018 @01:56PM (#16145622)
There is still a necessary syntactical transformation sstep via `refmt`, and that transformation step does occasionally break.