News for hackers. Stuff that matters.
Re:Operating System Development in Rust by thirsteh on Sunday January 11, 2015 @08:27PM (#8872071)
You could say that Go is Python and Rust is Haskell, because, well, Rust is basically Haskell cleverly disguised as a C-style language so as to not scare away imperative programmers.
Re:Operating System Development in Rust by detrino on Sunday January 11, 2015 @10:13PM (#8872335)
> Rust is basically Haskell cleverly disguised as a C-style language so as to not scare away imperative programmers.

This comment is very condescending. It makes it seem as if C programmers are ignorant and Haskell programmers are enlightened. Haskell is a garbage collected, lazy, pure language which makes it unsuitable for many of the domains C-style languages are used in. These are also qualities not shared by Rust, which may explain why there is less resistance in its uptake by C programmers.

Re:Operating System Development in Rust by naasking on Monday January 12, 2015 @11:31AM (#8874757)
> Haskell is a garbage collected, lazy, pure language which makes it unsuitable for many of the domains C-style languages are used in.

Don't be so sure! [1] You could simply use Haskell as a metalanguage to generate a C program that does what you need, just like they did with copilot. No Haskell runtime needed.

[1] https://github.com/leepike/copilot-discussion

Re:Operating System Development in Rust by thirsteh on Sunday January 11, 2015 @11:10PM (#8872462)
Oh, come on. Don't take things so seriously. There are tons of Haskell programmers who don't know C, too, and Rust is just as much of a way for them to reap the benefits of C as it is anything else.
Re:Operating System Development in Rust by kyllo on Sunday January 11, 2015 @11:33PM (#8872518)
I'd say Rust is more like C and OCaml had a baby.
Re:Operating System Development in Rust by saosebastiao on Sunday January 11, 2015 @11:56PM (#8872578)
An amazing compliment, IMO.
Re:Operating System Development in Rust by agumonkey on Sunday January 11, 2015 @10:06PM (#8872322)
Reminds me of hop and house (haskell based OS) http://lambda-the-ultimate.org/node/299 ~ 2004
Re:Operating System Development in Rust by vezzy-fnord on Sunday January 11, 2015 @08:38PM (#8872110)
Could you elaborate on that? Rust has a powerful static type system, HOFs, is expression-based, has an unusually good pattern matching engine for its intended area, assumes immutability by default and uses a notation for function signatures typically associated with FP, but I don't think those are enough to call it a "cleverly disguised Haskell".

In fact, it has been my observation that the language has been getting progressively less functional since its early days. Not that I consider this to be bad.

Re:Operating System Development in Rust by thirsteh on Sunday January 11, 2015 @08:44PM (#8872122)
Sure -- basically what you said: http://science.raphael.poss.name/rust-for-functional-program...

Of course it's not exactly Haskell, but it's arguably closer to FP than it is to C, yet manages to be approachable to imperative programmers. I think this is fantastic.

Re:Operating System Development in Rust by nightski on Monday January 12, 2015 @03:34AM (#8872935)
That would be a really tough argument to make. It goes to great lengths to give control over memory layout and control and lacks a LOT of the features of Haskell's type system. It's a lot more like a prettier D than Haskell. Not only that with every iteration it has been moving farther away from the FP paradigm.
Re:Operating System Development in Rust by naasking on Monday January 12, 2015 @11:35AM (#8874783)
I think you mean GHC's type system, since Rust is arguably quite close to Haskell 98 in spirit, ie. algebraic types, lambdas, pattern matching, traits = single parameter type classes.
Re:Operating System Development in Rust by Retra on Sunday January 11, 2015 @10:01PM (#8872307)
I think the point is that it seems actively inspired by Haskell -- that the things people like about Haskell are the same things the designers of Rust want in their language.
Re:Operating System Development in Rust by saosebastiao on Monday January 12, 2015 @01:38AM (#8872759)
As far as I can tell, there is some Haskell inspiration in the form of typeclasses (traits in Rust), but almost everything else that resembles FP has a more common denominator in ML. (Even Haskell's type classes have some common lineage with SML Functors)