News for hackers. Stuff that matters.
Re:A taste of Rust by lobster_johnson on Thursday April 25, 2013 @05:56PM (#5610169)
True, Ocaml has semicolons, although it's a little different given that you can construct deeply nested functional expressions without ever using a single one. If I remember correctly the semicolon is a separator, not a terminator, which means that declarations don't need to end with a semicolon, for example, and you pretty much only need it to separate statements.
Re:A taste of Rust by klibertp on Friday April 26, 2013 @02:21AM (#5611735)
I'm not sure I prefer 'in' over semicolon in declarations. I mean:

    let x = ref 0 in
    (* something *)
in Ocaml is not much worse/better than

    let mut x = 0;
    // something
in Rust. As I said above, that's really a minor, stylistic issue, one probably would write "let x = mut 0 in" for a week or so (coming from OCaml) and that's it, after a week it becomes as natural to write semicolon as it is to write 'in'.
Re:A taste of Rust by lobster_johnson on Friday April 26, 2013 @10:07AM (#5612959)
I agree, I didn't really put OCaml forward as the ideal solution. Ruby and Go solve the semicolon problem in much better ways, in my opinion.
Re:A taste of Rust by kibwen on Friday April 26, 2013 @12:07AM (#5611424)
AFAICT, if you were to write in Lisp-like purely-functional style, you wouldn't need any semicolons in your Rust code either.