Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by adamnemecek on Thursday September 11, 2014 @02:53AM
(#8301215)
Rust actually has an optional GC. Also, even non-GC code in Rust is a lot different than say in C++ since the compiler can point out a lot of memory leaks to the programmer.
[ Parent
| on HN ]
Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by mercurial on Thursday September 11, 2014 @03:08AM
(#8301252)
I'm well aware of that. However, using GC fattens considerably Rust type signatures (want a garbage-collected list of garbage-collected Foos? Enjoy writing Gc<List<Gc<Foo>> everywhere). It's just not particularly idiomatic. And Gc types are not Send types, so you can't share them across tasks, which is unfortunate since we were precisely discussing the lack of parallelism in OCaml :)
It's not a dig at Rust, which I think is very well designed, but IMHO, it is in a different niche compared to the other functional languages listed above.
Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by mcguire on Thursday September 11, 2014 @12:36PM
(#8303559)
"...writing Gc<List<Gc<Foo>> everywhere..."
Rust, unlike Java, has type definitions[1]; there's no need to use the full expansion everywhere.
(I don't believe it's even necessary in Java, but creating subclasses has its own downsides.)
[1] http://doc.rust-lang.org/0.11.0/rust.html#type-definitions
Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by mercurial on Thursday September 11, 2014 @04:03PM
(#8304825)
Yes, you can do that, but it's pretty obvious that if you want garbage collection everywhere, you're not going to use a language with linear types and optional, pretty much discourage GC, and write type synonyms all over the place (or fat signatures), you're going to go for a language where it's natural.
Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by LeonidasXIV on Thursday September 11, 2014 @04:02AM
(#8301394)
> Rust actually has an optional GC.
Last time I checked (0.10 or so) it did not. Gc pointers were the same as Rc pointers with a proper GC to come soon.
Re:Caml Trading – Experiences with OCaml on Wall Street [video]
by mcguire on Thursday September 11, 2014 @12:31PM
(#8303540)
Rust has roughly the same problem as C/C++: without compiler support for garbage collection, you quickly get off into the unappealing-option weeds. In this case, either "conservative" collection, or smart-pointer based collectors, which have performance issues compared to "proper GC's". (As far as GC features go, you can get pretty far with smart pointers: http://maniagnosis.crsr.net/2014/03/automatic-memory-managem... .)