News for hackers. Stuff that matters.
Re:PowerNex: a kernel written in the D Programming Language by kbenson on Friday June 24, 2016 @12:54PM (#11971394)
I'm not under the impression that all that much of what Rust does, besides borrow checking, is necessarily all that new. Aren't most the other things from other languages that have used them to good effect?
Re:PowerNex: a kernel written in the D Programming Language by k__ on Friday June 24, 2016 @01:27PM (#11971717)
True story.

But look at the functional stuff. I mean how much of this is really in broad use?

Yes at the moment there seems to be a functional renaissance, but before that 90% of the programmers around the world tought of stuff like Haskell or OCaml as crazy academical experiments.

Re:PowerNex: a kernel written in the D Programming Language by kibwen on Friday June 24, 2016 @03:01PM (#11972472)
What "functional stuff" are you referring to? I don't consider Rust a particularly functional language, other than the fact that it has closures and the ability to `map` over iterators. And if closures and `map` are your benchmarks for functional stuff, then Python, Javascript, and Perl have been doing functional stuff for decades now. :)
Re:PowerNex: a kernel written in the D Programming Language by nv-vn on Friday June 24, 2016 @03:47PM (#11972854)
There is quite widespread use of monads in the standard library (albeit with a very targeted effort to hide their nature and make them very concrete).
Re:PowerNex: a kernel written in the D Programming Language by kibwen on Saturday June 25, 2016 @02:57PM (#11977495)
Can you give an example? I can't think of anything in the Rust standard library that I consider a "monad".
Re:PowerNex: a kernel written in the D Programming Language by nv-vn on Saturday June 25, 2016 @05:17PM (#11978043)
Iterators are monadic (since they have a flat_map method), Option and Result have the and_then method. Both of these are equivalent to >>=/bind.

The fact that they don't implement pure/return doesn't change the fact that they have monadic interfaces because that would only be useful once it was generalized to its own trait, and such a function would be trivially implemented for any of these types. For example, Some(x) works as the return/pure function for Option and the fact that the name differs for each type is not an issue because there's no way to make code generic over all monads as it is. It would be like having a unique trait for each type where there's `bind_option` and `bind_result`, etc.

Re:PowerNex: a kernel written in the D Programming Language by kibwen on Saturday June 25, 2016 @05:30PM (#11978084)
`Option` et al may have vaguely monadic interfaces, but don't you need `return` in order to satisfy the monad laws?

Regardless of what we determine there, I don't think that matters in the broader context of this thread, which concerns the notions that Rust has the potential to scare people away by including unfamiliar "functional stuff". But seeing an `.and_then` method doesn't scream "functional programming"; method chaining has been long popularized in Javascript, Ruby, etc. Furthermore, AFAIK there's nothing about Rust's pseudo-monadic interfaces on iterators that hasn't already been popularized by LINQ in C#.

Re:PowerNex: a kernel written in the D Programming Language by pjmlp on Friday June 24, 2016 @03:32PM (#11972738)
I guess I belong to those 10%.

My first FP language was Caml Light in 1995, I was doing "LINQ" in Smalltalk on that same year and Prolog on 1996.

Sadly not all CS degrees are how they should be.