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

It seems to me that Rust would be pretty much strictly better than this.

In particular Rust has similar syntax, seems to have all Reason's features plus the linear types and regions/borrowing that allow memory and concurrency safety while still being able to mutate memory and not being forced to use GC.

They are aware of Rust since they cite it in their page, so I wonder why they decided to create this instead of using Rust.

It would be nice if they explained this in the FAQ.

I guess it might be useful if you have an OCaml codebase to interface with but don't already know OCaml, but given the relative obscurity of OCaml that seems a pretty narrow use (and also Facebook isn't known to make extensive use of it, afaik).



Actually, OCaml has plenty of features that Rust doesn't have. The ML module system/functors are a big one. Polymorphic variants. Global type inference. GADTs. Garbage collector :).


Both garbage collected languages and rust offer memory safety, rust just trades better performance for a more complicated borrow system.

Use rust when you need the performance. Use a GC'd language like reason when you want less things to reason about.


> rust just trades better performance for a more complicated borrow system.

I would say Rust trades more predictable performance for a more complicated borrow system.


Rust’s borrow system is actually not the key part; if it were just that, then yes, it would be purely a complication performance would be the only important part about it when comparing it with garbage collection. No: the key part is the ownership model, that an object is owned in precisely one location. Borrowing sits on top of and fits into that, not the other way round.

The ownership model is the part that I don't myself yearning for in other languages I work in such as Python and JavaScript.


Exactly.


Some people consider the garbage collector to be a feature :)


They describe using OCaml significantly, and wanting a migration path to a language with nicer syntax but same power/features.


Rust lacks a REPL right?

REPL is quite nice for programmer productivity.


There is rusti, but it is limited.




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

Search: