News for hackers. Stuff that matters.
Re:Crypto is an unproductive bubble by hedora on Friday March 18, 2022 @09:32PM (#30729983)
In fairness, they picked JavaScript as the language to write the transactions in.

People keep losing money making coding mistakes that even "gcc -Wall -Werror" would refuse to compile. Examples: type errors like L1 vs L2 (whatever that even means, not a crypto person), wrong number of function parameters causing some sort of currying, allowing that massive ETH heist a few weeks back.

I'm sure there are hundreds of other similar horror stories.

"-Wextra -pedantic" would protect against even more bugs.

(I'm not saying C is a reasonable choice, just that JavaScript was a laughably bad choice.)

Re:Crypto is an unproductive bubble by DennisP on Friday March 18, 2022 @09:44PM (#30730068)
Contracts are mostly written in Solidity. Despite common rhetoric, it doesn't have much in common with Javascript besides curly braces. Solidity is statically typed, has class-based inheritance, and all numbers are integers. Javascript is dynamically typed, has prototype-based inheritance, and all numbers are floats.
Re:Crypto is an unproductive bubble by marginalia_nu on Friday March 18, 2022 @09:48PM (#30730090)
Honestly, the language doesn't matter. Most bugs are logic errors or requirements oversights.