On the heel of Tesla Announcing that they have bought 1.5 Billion in Bitcoin (BTC) and Elon Musk trolling Cardano (ADA) on social media with various references to the ADA protocol, Tesla has now listed on its website that they are looking to hire someone for the position of a “Haskell Engineer.”
It could be pure speculation to think Tesla is building on the Cardano blockchain, but many have been speculating and this does indeed make things seem like they could be more than a coincidence.
The Cardano blockchain is built using a functional programming language called ‘Haskell’.
Haskell is the basis for Plutus, Cardano’s smart contract programming language, and it also powers Marlowe, our domain-specific language for financial smart contracts. However, Haskell is not one of the best-known programming languages. Nor is it widely picked up by those just starting out on their journey as a developer. In fact, the ‘Popularity of Programming Languages Index’ ranks Haskell as the 27th most-searched-for 37 language on Google as of November 2020, with the likes of Python and Java taking the top spots.
So, with this in mind, many may wonder why Cardano was implemented in Haskell in the first place? The reason is that Haskell, particularly in conjunction with formal methods, is well-suited to write code that is robust and correct. But to understand why this is important for Cardano, we first need to explore what Haskell is and examine its role as a functional programming language.
Evolving over time, Haskell has been through several iterations, such as Haskell 98 and Haskell 2010, with dedicated community members adding extensions, type classes, and building Haskell compilers to support the ecosystem. There now exists a vast body of work and comprehensive libraries and tools for Haskell developers to utilize.
As one of the purest functional programming languages, Haskell has reportedly led many developers to transform the way they approach programming 53 in general and helped improve their overall abilities as programmers.
According to Aaron Contorer, CEO of Haskell programming company FP Complete, this has led to Haskell being voted as the most recommended language 53 to learn even if developers have no specific need for it, which is why we encourage all developers to explore what Haskell has to offer.
Why was Cardano implemented in Haskell?
We have learned that Haskell is a functional programming language, which is well-suited for high-assurance code and programs that require a high degree of formal verification.
As we have discussed above, this allows programmers to have a larger degree of certainty that the code they have implemented is correct. For the future that we envisage for Cardano—namely becoming the next global social and financial operating system—assurance and reliability are essential.
With the arrival of decentralized applications, tokenization, and smart contracts on Cardano, we expect that an entire ecosystem of decentralized financial services will arise. This will bring billions of dollars of value or more on-chain, locked through smart contracts, or managed via decentralized autonomous organizations (DAOs).
However, current smart contract infrastructure has failed to secure this on-chain value, mostly implementing new, custom-designed programming languages, each of which requires its own toolchains, libraries, and educational resources—making it difficult to formally reason 32 about the behavior of smart contracts and applications built atop them.
We know from experience that the resultant vulnerabilities, code failures, or smart contract exploits on other blockchains and smart contract languages have resulted in disastrous consequences 30 and led to considerable financial losses, often in the billions of dollars. This has led some to question 3 whether smart contracts will ever be viable from a risk perspective to institutional users.
This is where Haskell comes into its own. Through Haskell, Cardano’s Plutus and Marlowe smart contracts can be carefully implemented in a precise, formally verified code that offers a high level of assurance from the beginning.
Plutus and Marlowe are offered as a set of libraries for Haskell, leveraging existing Haskell documentation, toolkits, and a highly-professional community to provide a base from which to build secure and enterprise-grade smart contracts.
Both off-chain and on-chain code for Cardano is written in Haskell, which allows Cardano to inherit the rich body of research 32 that already exists within the Haskell ecosystem, instead of reinventing the wheel with a totally new and unproven smart contract language.
To provide support to the wider Haskell community, Cardano’s engineering partners IOHK have recently donated to the Haskell Foundation, an initiative which supports Haskell development and growth. You can learn more about the Haskell Foundation from Simon Peyton Jones keynote address at the Haskell eXchange 2020 virtual event here 19.