DEV Community

Discussion on: The programming languages I like and why I like them

Collapse
 
_gdelgado profile image
Gio

Wish there had been one pure FP language in here such as Haskell, OCaml or Clojure.

Collapse
 
deepu105 profile image
Deepu K Sasidharan

That is because I don't believe in pure FP 😉

Collapse
 
_gdelgado profile image
Gio

haha fair enough I guess. Is it because you find it to be impractical?

Thread Thread
 
deepu105 profile image
Deepu K Sasidharan

Yes. I like to use the paradigm that works best for issue at hand. I like to do functional programming when possible and imperative/procedural/oop when necessary. Thats why the languages I like are multi paradigm languages. I like to use good things from all paradigm. For example in Rust I use monad like constructs (iterators, optional) and chain function pipelines all the time. But I also make use of traits (I know its not OOP, but the style is bit similar IMO) and I do imperative when functional code is too convoluted to write in some cases. Being tied heavily to one paradigm is restrictive IMO. Also in languages other than Rust/C++ you pay a price for doing heavy functional programming, while it might be negligible for most use cases, it would make a difference in performance critical use cases. For example I would always write for loops instead of recursion when performance is important (Except in Rust due to zero cost)