Re:Why has functional programming become so popular in non-a...
by dave4420 on Sunday March 05, 2023 @03:58AM
(#35028013)
As a fellow person-who-has-not-learned-Rust… I don’t understand why (some?) people consider Rust to be a functional language.
Re:Why has functional programming become so popular in non-a...
by kramerger on Sunday March 05, 2023 @04:04AM
(#35028034)
If you consider Rust a functional language then you may also include C++ (17 and upwards) in that camp :(
I dont think Rust is a functional language and I also don't think functional programming is particularly popular in the industry right now.
Re:Why has functional programming become so popular in non-a...
by habibur on Sunday March 05, 2023 @04:06AM
(#35028048)
Good point. But is Rust promoting FP now?
Re:Why has functional programming become so popular in non-a...
by ccouzens on Sunday March 05, 2023 @04:46AM
(#35028208)
I think it depends on if you define a functional language as one that functional programs can be written in, or a language that can only write functional programs.
I often see JavaScript described as a functional language, so I think modern parlance leans towards the former.
Re:Why has functional programming become so popular in non-a...
by spoiler on Sunday March 05, 2023 @04:59AM
(#35028245)
Honestly, it might just be a matter of taste. Not everything is for everyone. For example, I find Python hideous in more than one dimension, yet I like Rust (and Ruby, weirdly enough).
Even though a lot (most?) Rust code you encounter will be written in functional style, it's not a FP language, but it does borrow some great FP/ML ideas.
:-)
I personally find Rust so ugly that I refuse to learn it. I don't understand why things like "let mut" are even allowed to exist. Why not simply "create" or "var" for "let mut" and "define" or "def" for "let"?
I am not trying to start a flame war, rather I believe I'm documenting my own ignorance of Rust, the language which I believe you are subtly referring to. I tend to learn languages from an aesthetic angle: If they look beautiful and practical to me (like Python with type annotations), I learn them. Otherwise I steer clear of them while waiting for the world to become ecstatic over them and cool down again a few decades later.