Rediscovering Mathematics
My Calculus teacher in high school introduced a debate in the mathematical community—is mathematics discovered or invented? Discovery implies finding something that already exists. Inventing implies creating something that wasn’t there before. The title gives away the answer, of course. Math is a universal language. We only invent new ways of expressing it.
Programming Meets Mathematics
Having taken two years of math in college as part of my engineering degree, then writing software code for almost 10 years, I was not expecting to discover parts of math that would challenge me with new ways of thinking. This changed when I decided to dive deeper into functional programming and learn Haskell.
Although Haskell was invented over thirty years ago, its stable release was not until 2010. That’s only a year after node.js, now a ubiquitous browser runtime, was released. So, it is an older language finding new life in several areas, like finance and medical tech, where security and reliability are critical.
Although I’m very much a beginner when it comes to the ins and outs of the language, compiling a few programs and writing test cases now helped me understand what makes Haskell special and why I’ll continue learning it. Here’s the best way I could write about it and how it relates to the famous debate about whether mathematics is discovered or invented.
Why Haskell is Unique
Suppose there was a gray area between discovery and invention. The invention side of this gray area would have things about mathematics that are already known or obvious to prove to someone with formal study. Then, through a scientific process of trial, error, and experimentation, suppose a few computer scientists took these concepts about mathematics and designed a turing-complete programming language using them. You’d get Haskell. In other words, Haskell is almost like a fabric that connects the world of discovery to the world of invention.
Functions like `map`, `filter`, and `reduce` originate from the world of functional programming. Although I make use of these and other pure functions, Haskell rips off the training wheels. There is no explicit keyword to loop through a list of items. Everything is functionally recursive. It’s a stumbling block to the uninitiated. I count myself among them. But the water is fine. I’m ready to surf the currents of discovery and revisit what I missed last time.