4

I'm trying to understand the design decisions behind Michelson and I'm in the process of evaluating if I should be writing my dapp in the Tezos blockchain.

What type of benefits does Michelson have over other smart contract languages(say compared to Ethereum's solidity)? What problems is it designed to solve and why should a developer choose Michelson?

6

Michelson lets you write concise contracts using high level primitives (like maps, sets) without departing from Tezos' native VM. That means you don't have to trust your contract to the output of a compiler. What you see is what is executed on chain. In addition, it is purely functional and statically typed, attributes which generally help developers avoid introducing bugs.

  • I noticed this post refers to Michelson as not functional, while referring til Liquidity as functional: thealmarty.com/2018/12/09/… – is that incorrect, or am I missing some nuance? – andimule Feb 12 at 9:51
  • There's no, one, hard definition of what makes a programming language functional. It's generally a collection of things: fist class functions, currying, closures, lack of side effects and often static typing. Arguably the most important one is lack of side effects and Michelson has none. It also has lambdas and static types. Michelson is definitely functional. – Arthur B Feb 12 at 11:17
9

The main benefits of Michelson are the guarrantees that it gives on the execution of a smart contract : static typing catches many errors, and the semantics is clearly defined, so you have no surprise at execution.

Yes, Michelson is a low-level language, you should aim at a higher-level language, like Liquidity (http://www.liquidity-lang.org/), that compiles to Michelson.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.