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

>See languages like C++ and Scala

Of the 4 you mentioned (Constraint based generics and parametric polymorphism, operators as functions, algebraic types and type-safe failures, and pattern matching/compound expression) C++ really only has 1 (operators as functions).

>with hundreds of features and language specification that run into the thousands of pages.

This describes neither Rust nor Haskell.

>Go is "as simple as possible, but no simpler".

It has mandatory heap usage, garbage collection, green threads. It's more than generous to call that "as simple as possible".

Of the 5 features you mention that Go has "canonical solutions" to (in the form of external tools), I know off the top of my head that Haskell's Cabal takes care of at least 4 of them. I'm not sure about formatting. Rust probably has similar tools, or if it doesn't, they can certainly be added without changing the language.



> Rust probably has similar tools

* Testing

Built-in: http://doc.rust-lang.org/master/guide-testing.html

* Documentation

Built-in: http://doc.rust-lang.org/master/rustdoc.html

* Sharing code and specifying dependencies

The newly released 'cargo': http://crates.io/ https://github.com/rust-lang/cargo/ (alpha, but quickly improving). This will be Rust's cabal equivalent, almost certainly with support for generating documentation and cross-compiling (it already has basic support for running the tests described above).

* Formatting

Missing at the moment, but very wanted: https://github.com/rust-lang/rust/issues/3195 .

(Well, to be precise, the compiler has the '--pretty normal' option, but it's not so good. https://github.com/pcwalton/rustfmt is the work-in-progress replacement.)

* Cross compiling

Already supported, although it requires manually compiling Rust with the appropriate --target flag passed to ./configure, to cross-compile the standard library.


I would be very wary about promoting Cargo as a 'cabal equivalent'. :P


To be clear, I just meant in the context of

> I know off the top of my head that Haskell's Cabal takes care of at least 4 of them

from the post I was replying to.


Perhaps Opam equivalent? I've been using Opam for two years in OCaml, and it just works (tm).




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

Search: