Ethereum
AUTHOR: <schiptsov@gmail.com>
I am old-enough to witness the rise and fall of PHP (the fractral of bad design, as you might know). I have seen PHP 2.0. I even wrote some stupid shit, being totally ignorant.
Then I read this https://www.pixelstech.net/article/1334166417-PHP%3A-a-fractal-of-bad-design and realized how ignorant I am. Since them I am self-studying programming languages.
So I know the one when I see it.
Ethereum is exactly the same idiotic amateur bullshit exuberance (or an amateur shitfest), but this time it is way worse than PHP was.
Literally everything has been put together without much thinking (skipping understanding) by over-excited, unqualified and mostly narcissistic guys.
Again, let me emphasize - no one has been qualified to do the proper desing work for Ethereum. Not a single prominent figure had a necessary education back then.
So the technical debt (of bad decisions) is a literal plague for the project. Everything which could have been done wrong has been done wrong.
It is a literal imperative spaghetti in a low-level languages, which introduce unnecessary complications, verbosity, confusion and in general are not suitable for high-level domains.
Solidity
This is where you got exactly these PHP vibes. You open a “hello-blockchain” source and you see PHP, even if it does not prefix variables with a dollar sign.
You see the same quickly put together ad-hook crap in a hurry, without any understanding of PL fundamentals or a distinct desing process. It is just the worst crap possible.
How do you know? Well, the past almost 60 years of research in the field of programming languages semantics, which has been culminated in modern Haskell, Ocaml and Scala 3, evolved some fundamental principles and heuristics, and what you see is total lack of these.
They just did not bothered with stuff like studying the principles, and one who did can easily and unmistakably see it.
One does not have to be a “genious” to expect that same clustefuck of problems which plagued PHP to emerge for Ethereum and Solidiry. These are just direct concequences of literally ignoring 60 years of research. PL desing is a serious thing and it requires a lot of work.
Just some imperative Javascript-like crap with shitty ad-hook static types thrown at it in a hurry will not do it.
A quick look
A contract in Solidity is a code (its procedures) and data (the state variables) that resides at a specific address on the Ethereum blockchain.
So, it theory, it has to be some pure functions with send and recieve
primitives, similar to Erlang
actors. But they never read a single book, leave
alone a book about Erlang.
Conceptually, Ethereum addresses are just like Erlang
“names”, and the code must
be pure with carefully designed primitives – just understand and follow the
best practices of developing of robust distributed systems.
Instead we have a fucking ad-hook mess by unqualified amateurs from all over the world.
Anyway, conceptually, there are procedures at addresses, executed inside of an istance of a Virtual Machine. These VMs ran on user’s computers, and execute procedures for gas fees.
These “procedures” are full of “getters” and “setters” and more like “OO objects
with an internal state” (but there is no this
) than pure message-passing “Actors”.
Just like it is with objects, calling methods is the way to send messages. This is just a proven wrong way, but how could vitaliks know?
Like objects in, say, Python, everything is public and writable by anyone. Absolutely idiotic idea for a supposedly distributed system. This and similar fundamental fuckups is their technical debt.
Naive, young vitaliks dreamed about “objects” instead of Actors, method calls instead of asyncrohous message-passing. Why, a distributed system by amateurs PHP coders.
Just keep in mind that originally everything has been based on fundamentally wrong principles, having nothing to do with how distributed systems should be designed and implemented.
And these 256bit integers LMAO, a boxed type without any hardware support. No proper Numeric Tower in a language for mostly arithmetic workloads. Anyway, vitaliks is a multi-millionarie, and I am a literal nobody.
I do not want to look into the EVM, I am pretty sure that they never read “The Implementation Of Functional Programming Languages”, never heard of graph reduction, what is BEAM and ignored the huge literature on the subject.
So, now what?
For last 10 years a huge amater community have managed to put ad-hook fixes and
make it usable (exactly like PHP, by the way). So, by just using current solutions (geth
and solc
) very carefully one can use the ecosystem for some simple tasks.
The obvious ones are to collect transaction fees, just like Uniswap did. (I remember looking at Uniswap-v2 github repo, but I just shrugged and passed by. I should have realized how so little of a crappy code generate so much money).