The Coconut Programing Language
A friend of mine tipped me off to a neat little project called the Coconut programming language (opens in a new tab). From the docs:
Coconut is a functional programming language that compiles to Python. Since all valid Python is valid Coconut, using Coconut will only extend and enhance what you're already capable of in Python.
Because I have a math degree and use functions in my Python code I like to pretend I'm a functional programmer (mustache twirl). However, other than my annual 30-minute attempt to learn Haskell on the first day of Advent of Code (opens in a new tab) and the occasional Python type hint (opens in a new tab) -- I haven't made much progress on that front.
On one hand, I doubt I'll spend much time with Coconut. But on the other, I do think this would be the first project I would reach for now if I wanted to get my hands dirty working in a functional framework.
My last thought here is that this project kind of reminds me of CoffeeScript (opens in a new tab). That effort seems to have run out of steam (opens in a new tab) but developers of a certain age will remember it as another Haskell-influence language that compiles down to a "mainstream" language.
MIT 2023 © Nextra.