Functional programming goes tropical with Coconut, a powerful Pythonic programming language

Share
  • January 4, 2019

Looking to bring a tropical flavor to your Python programming? Even though you’re looking for something functional, that doesn’t mean you can’t spice things up a bunch! That’s why Coconut is such an exciting tool for Python developers.

Coconut is a functional programming language that compiles directly to Python. Functional code is simple, clean, and readable. Why not bring that to Python? Now, Python developers can take advantage of modern functional programming without any compiling issues.

Essentially, Coconut allows developers to write Python without needing to worry about things like version compatibility while giving them access to all kinds of extra tools and functions. Anywhere where you can use a Python script, you can also use a compiled Coconut script.

Accessing that core compiler is simple with the command line utility. Developers are able to compile single files or entire projects, interpret code on the go, and add their code into existing Python applications like IPython or MyPy.

If you’re a Python developer looking for built-in, syntactical support for pipeline-style programming, prettier lambdas, or partial applications, then Coconut is for you! Other features include pattern-matching, destructuring assignments, infix notation, operator functions, lazy lists, and more.

These days, you can’t talk about Python (or a Python derivative) without mentioning machine learning.  So, in addition to being essentially a compiler for Python 3, Coconut supports Jupyter notebooks, one of the more popular data science tools out there. And, for the record, it also supports any version of Python 2.6 or above.

Named in honor of the fabulous coconuts from Monty Python, this functional programming language is certainly too heavy for a swallow to carry. Even an African swallow.

SEE MORE: Create charts easily in Python with Spotify’s newest project

Trying out Coconut

Getting Coconut is easier than opening one in real life: just type pip install coconut into the Python command line and you’ll be sorted! Coconut also offers extensive documentation and tutorials. There’s even an online interpreter.

More information can be found on GitHub and on the Coconut website.

The post Functional programming goes tropical with Coconut, a powerful Pythonic programming language appeared first on JAXenter.

Source : JAXenter