Re:Choosing Nim out of a crowded market for systems programm...
by sph on Saturday November 26, 2022 @03:58AM
(#33751142)
How would functional programming help with Rust? I am fluent in both, and having map and reduce in the Iterator trait does not make Rust anything like a functional language.
Re:Choosing Nim out of a crowded market for systems programm...
by Gene_Parmesan on Saturday November 26, 2022 @05:38AM
(#33751571)
IMO Rust is what you'd get if you took a functional lang designer and forced them at gunpoint to create a procedural systems lang. It's not functional, but you can tell it was largely inspired by ideas from the paradigm -- immutable by default, expression-centric to an extent, features like Option<T> and Result<T> available, etc.
It's certainly a language that encourages programming in a functional flavor, even if the lang itself isn't functional.
Re:Choosing Nim out of a crowded market for systems programm...
by efnx on Saturday November 26, 2022 @01:52PM
(#33755443)
The things that make rust “functional” are features like a type system that supports sum and product types and functions as typed values that can be passed around. It really is a functional language (in the original ML sense of the word) but with another orthogonal type system bolted on (borrow checker).
It’s missing some features like higher kinded types but it’s functional nonetheless.
I’m interested to hear what your definition of functional is - it’s always interesting because it’s such a vague term, really.
Re:Choosing Nim out of a crowded market for systems programm...
by efnx on Sunday November 27, 2022 @01:17PM
(#33765145)
Jeez downvoters - just look at the definition of “functional language”
https://en.m.wikipedia.org/wiki/Functional_programming
And then tell me Rust is _not_ those things.
Nothing beats Cargo and company and loves compiler messages. Have used NIM as python replacement, and while language is great and nim batteries are decent, the ecosystem is not there. But who would use nim as python replacement!?