Mixing object-oriented and functional programming

前端 未结 12 1831
渐次进展
渐次进展 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:14

    • OCaml
    • O'Haskell (and object oriented programming is somewhat possible even in normal Haskell)
    • Nemerle
    • Possibly newLISP

    Also, many scripting languages such as Python, Ruby, Lua, etc. have this capability, but lack many of the nice features of functional languages such as algebraic data types and pattern matching.

提交回复
热议问题