Mixing object-oriented and functional programming

前端 未结 12 1871
渐次进展
渐次进展 2020-12-24 01:33

What languages are available that promote both object-oriented and functional programming? I know that any language that supports first-class functions can be considered fun

12条回答
  •  孤独总比滥情好
    2020-12-24 02:25

    OCaml and F# are the most popular languages that mix OOP and FP, as far as I know.

    Most languages, like Ruby, mix functional programming in, but a lot of people don't even realize it. I find languages like that leave a lot to be desired on the syntax front and such.

提交回复
热议问题