4 ms·
This is why I keep saying that "smart contracts" should be expressed in some declarative notation like decision tables. Byte-coded programs as contracts were a
by Animats 9y ago
This is why I keep saying that "smart contracts" should be expressed in some declarative notation like decision tables. Byte-coded programs as contracts were a really bad idea. Contracts need to be readable, not just executable.
- dvcc 9y agoI'm kind of curious on what you think about Tezos and its Michelson language (https://www.tezos.com/static/papers/language.pdf https://www.tezos.com/static/papers/language.pdf) which offers provability of contracts.
- sna1l 9y agoJust looking at this language, it makes me feel like we are going back in time in regards to readability and ease of use. I understand that security and provability of contracts is more important in these cases, but one can dream!
- fab13n 9y agoMichelson is a VM bytecode, not a programming language, although it happens to be readable enough to write simple contracts in it directly. IIRC, the old Camllight VM was pretty similar (I might misremember, that was literally decades ago); an ML-like language to Michelson compiler is fairly straightforward to write and to prove sound. I'm happy that they do things the sane way, i.e. focusing on sound foundations rather than on how Javascripty the syntax looks; but I'm afraid the communication isn't as clear as it could/should be. Blessing a compiler for some subset of ML, as a first high level language, would have cleared things up IMO.
- aisofteng 9y agoI find it perfectly readable. Precise and intentful. Perhaps you're just not accustomed to formal writing?
- antocv 9y agoByteball (https://byteball.org/ https://byteball.org/ has declarative smart contracts!
- Animats 9y agoThat looks interesting. I just skimmed the white paper. It's not clear what their contracts can do, though. They need more examples. The underlying DAG idea has potential. You could have two half-transactions happening on separate subtrees, where A is buying X from B and B is paying Y to A. So A broadcasts "A will buy X from B when B pays Y to A", and B broadcasts "B will pay Y to A when A buys X from B". When the matching half-transactions acquire a common child, the transaction commits. It's a true "meeting of the minds".
- antocv 9y agoYes they do have that what you are describing, "smart conditional payments". You can for example trade user-defined (possible private) assets (tokens) in that way - "Ill send you my bytes for your blackbytes, I send bytes to this address and me can sweep them back after 4 hours, or you can sweep them if payment of X amount of blackbytes is made to my address". It has oracles as well.
- int_19h 9y agoTime to revive Prolog, perhaps?
- zmonx 9y agoYes! Prolog is a great language for such use cases in my opinion.
- federicobond 9y agoThe problem is that decision tables usually end up really big for anything but the most trivial smart contracts.