Solidity is the JavaScript-like programming language designed for developing smart contracts that run on the Ethereum Virtual Machine (EVM).
My intuitions are saying that the language should be functional, simple, high-level and damn well tested. Ideally it should also be close enough to natural language that it would be partially self-documenting and difficult to hide nasty tricks in. And it should have a strict syntax so that there’s only one correct way to do anything ever, and deviating from it would produce an obvious error instead of unexpected behavior and it would be noticed at “compile-time” so that the only programs that ever get to run are Correct.
I’m not an expert yet but these features sound like inspiration should be taken from the likes of Ada, Haskell, Python etc.
…so they chose javascript instead
what has the world done to deserve this
And it should have a strict syntax so that there’s only one correct way to do anything ever, and deviating from it would produce an obvious error instead of unexpected behavior and it would be noticed at “compile-time” so that the only programs that ever get to run are Correct.
Python
Wat
That was more about the “natural language-resembling” part; to my knowledge none of those languages would satisfy all of the requirements, but Python programs are actually readable while javascript is…javascript.
Agreed. Now certainly Python is not an ideal choice. On the other hand, it’s not a terrible choice. First, it is established. Lots of people know it. It’s easy to pick up the basics, so there a low barrier to entry – which, getting all down with “This is based on Haskell, but with a dependent typing layer, and here are some links to research papers that describe the basics, except I’ve add some stuff, which will be maybe published in June. Keep an eye on arXiv. And – hey, are you familiar with co-inductive proofs?”
I mean, I’d have more fun learning the latter, but I can understand how a project would choose something like Python.
Javascript, on the other hand…
Just, no.
And the thing I was thinking of is basically something like that quote, with “…but it looks like Python.” appended
I might add Julia to the list of “languages that have some features that language should have” as it’s good for mathy stuff and has a readable syntax (“sum(primes(2000000))” was the most hilarious one-liner Project Euler solution ever as it’s literally impossible to describe the question in a shorter way) but it lacks in the other departments afaik, just like all of the others in their own way