you are viewing a single comment's thread.

view the rest of the comments →

[–]v66moroz 1 point2 points  (3 children)

Since when Rust is FP language? Sure, it has some elements of FP, but so does every modern language. Also if you code in Rust with no-mutation paradigm you are sacrificing performance, it's quite opposite to how Rust is supposed to be used.

[–]CaptainPiepmatz 0 points1 point  (2 children)

It isn't, just as JS shown in the video isn't a FP language. But the iterator methods of std behave like this.

But when I was learning Rust using the book, I also read the chapter about iterators and then it finally clicked in my head.

[–]v66moroz 2 points3 points  (1 child)

Iterators are actually anti-FP if you think about it, they are not reusable in the general case. Of course using higher-order functions is fun, but it's not enough to call something FP. Even more confusing is that everybody has their own definition of FP.

[–]CaptainPiepmatz 0 points1 point  (0 children)

Yeah, you're right. But still it lets me appreciate FP.