Mixing object-oriented and functional programming

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

    I'm wondering why you are looking for a language that specifically encourages mixing it up rather than just doing it anyway with a language that does functional programming and OO programming well? It could be easily brought into effect with Python, Ruby, Perl or similar interpreted languages. In addition C based OO languages tend to mix pure C with OO features, for example Objective C could easily be written in such a way should you choose.

    EDIT: I have been made aware I'm incorrect, I've left this answer here incase someone can learn from my mistake - see comments.

提交回复
热议问题