Is there a functional language for C++ ecosystem?

后端 未结 9 1941
孤独总比滥情好
孤独总比滥情好 2021-02-05 19:34

Java has Scala and .NET has F#. Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended i

相关标签:
9条回答
  • 2021-02-05 20:22

    Ah, something else. Although this certainly isn't what you meant, template metaprogramming in C++ is purely functional.

    0 讨论(0)
  • 2021-02-05 20:22

    I agree that I am not sure of an ecosystem for C++. OCaml is pretty popular for doing functional programming outside of .NET. F# is also based off of it.

    0 讨论(0)
  • 2021-02-05 20:25

    Since Scala compiles into Java bytecode and F# compiles into .NET bytecode, made to run on their respective virtual machines. The correct comparison would be if there is some functional language that compile to machine dependant code, ready to run on a computer, and yes, there are.

    I don't think that was what you meant though, but the best I have to offer is FC++. Boost is another library which has a lot of features that can be recognized as derived from functional programming.

    However, I'd wager there are no 'real' functional programming C++:es out there.

    0 讨论(0)
提交回复
热议问题