Is Haskell an impediment to uptake?


#1

Hi everyone. I’m considering buying some ADA, but I’m trying to get my head around Cardano’s real-world potential first. I’m not a dev, but I’m not a technical dunce either, and I’ve worked with and for developers for many years.

So here are my questions. I’d appreciate any knowledge you can impart:

  1. My understanding is that anyone who wants to build on the Cardano platform must use Haskell. Is that correct?
  2. I think relatively few devs use Haskell? (As opposed to, say, Ethereum, which I’ve read requires devs to learn some new libraries, but not an entirely new language, or NEO which doesn’t require devs to learn new languages at ) all.)
  3. If so, wouldn’t this drive up the price of development for anyone wanting to develop on the platform (smaller pool of talent)? And also make development a slower and more difficult process? For example, I’ve worked in development environments where front-end guys were in short supply, and as a result they got away with murder.

Seems to me this combination of factors will hinder real-world uptake? More than happy to be corrected if I’m wrong. :slight_smile:

Cheers Glenn


#2

Dapps shouldn’t be restricted to Haskell, I think that’s just what they built the core around.


#3

“1. My understanding is that anyone who wants to build on the Cardano platform must use Haskell. Is that correct?”

  • They name the language of Carrdano’s smartcontract as “Plutus”. I never tried Haskell before, but looking at the syntax of Plutus, it’s challenging compared to syntax of Ethereum’s Solidity. Maybe it’s my subjective opinion because I am a Javascript developer and Solidity’s syntax has similarity to javascript’s syntax. Here’s the link to take a look: https://cardanodocs.com/technical/plutus/examples/

"2. I think relatively few devs use Haskell? "

  • I Agree with you. Backend app’s programming are dominated by Java, Python, Javascript and soon Go Lang will be joining in as well. However, I heard Whatsapp’s Backend app is developed using Haskell, because the devs said it’s suitable for solving telecommunication domain problem on backend side.

"3. If so, wouldn’t this drive up the price of development for anyone wanting to develop on the platform (smaller pool of talent)? And also make development a slower and more difficult process? "

  • If most developers nowday came from Javascript, Python , Java language. Yes, I must admit that moving from Javascript & Solidity to Plutus (the haskell like ADA’s smartcontract) would be challenging. But, as long as the economic prospect of writing smartcontract of ADA is appealing, lucrative for developers and availability of tools, SDKs, Documentations of Plutus would be abundant in future, then no matter how challenging the plutus it, developers would be eager to sacrifice their time to put their efforts learning Plutus. For now, I found writing smartcontract using Solidity & Truffel for Ethereum is much more interesting than learning Plutus. I might be wrong but it’s my personal honest opinion.

Cheers.


#4

But lets not forget that the Cardano will also build support for solidity as a start.

The next effort is in developing a reasonable programming language to express stateful contracts that will be called as services by decentralized applications. Here we will support the legacy smart contract language Solidity for low assurance applications and develop a new language called Plutus for higher assurance applications requiring formal verification.

I suppose you’ll need to eventually pick up Plutus if you want to take advantage of the full CCL layer effectively, but I’m guessing you’ll get pretty far with solidity.


#5

Thanks for the replies guys. Much appreciated. :slight_smile:


#6

I’m a developer with an MSc in Computer Science, from a University with a heavy focus on theory.

My understanding is that anyone who wants to build on the Cardano platform must use Haskell. Is that correct?

That depends what you’re actually asking. If you’re asking what language to use when submitting pull requests to the open-source blockchain, then the answer is Haskell. If what you’re asking is what language to use when writing code for the Cardano Computational Layer (CCL), then there will be multiple options available as best I can tell, including but not limited to: Solidity (which Ethereum uses) and Plutus (Cardano’s own suggested language).

I think relatively few devs use Haskell?

If so, wouldn’t this drive up the price of development for anyone wanting to develop on the platform (smaller pool of talent)? And also make development a slower and more difficult process?

It’s hard to measure programming language popularity / use in general. PYPL lists Java, Python and PHP as the three most popular searched-for languages, but really it depends on domain. You will find lots of C and C++ in games programming, operating systems and embedded devices (lots of Java in devices too), and so on.

In general, Haskell is definitely less widely used than say Java, C or Python. But this actually doesn’t have the consequences you think it does. What it also means is that the people who DO know the language generally have a deeper understanding of it, and many of them have known it for a long time - leading to a smaller pool of much better developers. Especially in the functional community, where there’s a measurably better understanding of maths and core computer science fundamentals (algorithms and data structures).

I can’t cite you any sources for that, but I interviewed with a company a few months back who use OCaml, Erlang and JavaScript and have been using those languages for over 10 years. They’ve had exceedingly good results from their OCaml/Erlang developers, and a very, very high retention rate. Yes, they’re more expensive, but they also do amazing work and are generally more talented than your average ‘web developer’ by miles and leagues.

Seems to me this combination of factors will hinder real-world uptake?

Like I allude to above, I don’t think so - at all. Blockchains require a very specific skillset to work on, one which ideally involves a very solid understanding of linear algebra, practical statistics, cryptography and game theory. These are not skills your typical Javascript web-developer will look into (favoring instead other, more relevant skills for that), but are definitely likely to be close to home for many professional functional programmers, myself included.


#7

Great reply, thank you. I really appreciate you taking the time.


#8

Thanks again guys. I ended up buying a few ADA. I’m still not 100% sure about the coding side of it, but I love that the platform itself and the overarching approach seem really hard-core. Let’s see how it goes! :slight_smile:


#9

I’d just like to pitch in that (this is a rough approximation from what i recall) they are using some sort of a descriptive language to lay out the feature-set of Cardano which can then have libraries created to hook up to it with almost any langauge. So there shouldn’t be much issue once the libraries start rolling out for all the popular languages.


#10
  1. Not really: everybody who wants to build cardano-sl, the official implementation of Ouroboros, needs the Glasgow Haskell Compiler, but there is nothing that stops you to implement the protocol from scratch using your favorite language.
  2. Correct, but it is extremely popular in academia.
  3. If your system will be processing millions of dollars in crypto the last thing you should worry about is the cost of an engineer. With experienced Haskell programmers development time should be shorter and significantly less error prone, meaning the process would be easier and the final product probably safer.

Haskell is actually an excellent choice, maybe even the best choice for a project like Cardano. I don’t think anyone with a CS degree would see it as an impediment to uptake, on the contrary, it is something that brings a positive image of the engineering team behind Cardano, and it probably gives some guaranties about the quality of the software.

I would say that for smart contracts the DSL should be inspired in even more academic (meaning orders of magnitude less known :sweat_smile:) programming languages like Agda.


#11

Choosing haskell is actually a good thing, you avoid script kiddies like myself who doesnt understand the math


#12

Thanks guys. More great answers! :slight_smile:


#13

I agree about Haskell being an obscure programming language. I run a software development consulting company and we have never been asked to write code in Haskell. But we write in just about every other language out there and I think requiring Haskell is going to be an impediment to Cordano acceptance.


#14

There’s also another discussion about a JVM implementation of Ouroboros: Ouroboros for the Java Virtual Machine


#15

I think the idea of using a strongly typed ~purely functional language for smart contract development makes a lot of sense, granted a strongly typed language doesn’t prevent all problems but certainly takes you a long way especially when the type system is much stronger than in C#/Java/Go. My minimal experiment came from reading through first few chapters http://learnyouahaskell.com/chapters and then getting an eventual understanding of the XMonad configs I had been copy and pasting from ClosedOverflow, I didn’t find the few hours I spent more challenging than learning any other language, although I will admit it doesnt read like Python and Ive now forgotten it all.

I would be interested in the thoughts from Charles and others involved on the wallet project though, previously they had mentioned Javascript as being less than ideal when referring to Lisk (cant find interview but definitely read it today) but now the wallet is based on Electron and Javascript and its looks Bootstrap too. A quick peek at code on github seem they are using Typescript, but unless things have changed this is still quite a weak type system along the lines of C#. Is there the same amount of confidence in the wallets as the core network components? How is this going to work when building out Android and iOS apps? Is react-native the plan?


#16

There is nothing “obscure” about Haskell, quite the contrary, as pretty much everything in Haskell have been formally defined and well documented. I would even argue that Haskell is one of the most clear programming languages ever created. Because of this and also of course its theoretical foundations, Haskell is an extremely powerful language, especially when correctness is an essential requirement. For example, here is a new interesting paper that shows how one can use Coq for formal verification of Haskell programs: https://arxiv.org/abs/1711.09286

If you have never used a proof assistant before I highly recommend this text: https://softwarefoundations.cis.upenn.edu/current/index.html


#17

I saw this video this morning, and remembered this thread. I thought it would be relevant here.


#18

I agree c#/Java/ Go might not be as readable as Python but they are still excellent coding languages to learn. I have been in the field of software development for God knows how long and I started off with C# tbh.
It is still one of my all time favourites.
As for the wallet project, even I am looking forward to it.