4 ms·
FP vs. OO is more of a style argument than one of languages, since most decent languages provide support for both styles of programming. It happens that FP is m
by time_management 18y ago
FP vs. OO is more of a style argument than one of languages, since most decent languages provide support for both styles of programming. It happens that FP is much more often appropriate, at least among the problems I've encountered, but there's no reason a person can't use a language with support for both (e.g. Lisp, Ruby).
Static vs. dynamic typing, on the other hand, involves a decision about the language that has to be made early in development. Lisp's static-typing support sucks in comparison to what Ocaml or Haskell provide (automatic type inference, which kicks ass, and very powerful type systems). Likewise, if you want dynamic typing in Ocaml, you have to create a universal type: there are ways of doing this, but they're gnarly and slow.
I've often wondered about how to build a hybrid language. A possibility would be to implement a language like ML or Haskell (but keeping the S-expressions, because those are awesome despite their unpopularity) as a DSL within Lisp, heh. Now that would be the pwn sauce.
- hs 18y agothe lack of S-expressions prevents me from trying out other C-like-syntax FP languages (except js and python which i knew before lisp) i tried erlang, but really, my mind prefers thinking in lisp :( do i miss a lot not learning other FPs?
- felixmar 18y agoFunctional programming is more than a style. While programming in a functional style is possible in many languages it's very limited, even in a language like Scala. Regarding the hybrid languages i personally think that F# is relatively good for both functional and OOP programming. There are better functional and OOP languages than F#, but i don't feel too limited doing either. Clojure may also be a good choice but i don't have enough experience with it to give an opinion.
- hs 18y agomaybe the tone in multi-paradigm languages to me python seems emphasizing more on OO than FP; lisp is the reverse
- schtog 18y agoYou should have a look at Liskell and pluggable typesystems. Apparently Haskell also has some support of dynamic typing.