Python Forum

Full Version: Coconut - A Functional Language Which Compiles to Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://coconut-lang.org/

Valid python code is also valid coconut, so you could just add a little functional code to your project, then run it through the coconut compiler. Seems interesting.

For a quick example, in the interpreter on the homepage, try this:
range(10) |> map$(print) |> list
You can see the output, as well as the generated python code.
What? Already a side effect in the first example?! This is very impure, functionally speaking.
I got excited when I first saw this, but my god that is uuuugly code! I can't believe the creator is a Python person and created such heavy learning curve language (I would expect needlessly as well).