3 ms·
This doesn't look like Javascript to me: https://twitter.com/Mudit__Gupta/status/1443454935639609345 https://twitter.com/Mudit__Gupta/status/144345493563960934
by hasperdi 5y ago
This doesn't look like Javascript to me:
https://twitter.com/Mudit__Gupta/status/1443454935639609345 https://twitter.com/Mudit__Gupta/status/1443454935639609345
- pawelduda 5y agoI see Solidity as statically-typed JS flavour. Knowing all the gotchas, I think it deserves to be called the JS of DeFi. When you write code in it, it feels like walking on a minefield. Except when things go wrong, your frontend won't crash, but you'll lose yours or someone else's money. Not to mention, you have all sorts of people trying to exploit your code - draining smart contracts from money is a great incentive for black hats. So it's even worse than JS in some aspects (not just the language itself, but the platform it is tied to). EDIT: see https://ethernaut.openzeppelin.com/ https://ethernaut.openzeppelin.com/
- nootropicat 5y agoSolidity is nothing like js. The biggest security issue in js is weird implicit casting and conversions which aren't an issue in solidity. It's definitely the best language to write smart contracts as over the years simple traps have been eliminated, or are at least well known (the worst remaining one comes from people still using .transfer to send eth, but the method is widely known to be obsolete now). What remains is the actual irreducible complexity of writing smart contracts. The entire compound bug was apparently a typo, > instead of >=. No language can protect against logic errors like that.
- int_19h 5y agoHow much of this is still applicable? https://news.ycombinator.com/item?id=14810008 https://news.ycombinator.com/item?id=14810008