News for hackers. Stuff that matters.
Re:Ethereum is Doomed by wyager on Tuesday June 21, 2016 @01:03AM (#11943611)
> You want something that guarantees termination

You usually get that through a restricted subset of an otherwise turing-complete language. The standard approach is to impose a finite metric on the arguments of a function and demonstrate that, as the function recurses, that metric monotonically approaches zero.

>barely becoming practical in languages like Rust.

As far as I know, this cannot be done in Rust. Agda, Coq, and Idris are the primary languages supporting termination checking (because they are syntactically suited for it). Haskell supports it as well through Liquid Haskell.

Re:Ethereum is Doomed by dkarapetyan on Tuesday June 21, 2016 @01:14AM (#11943642)
I meant reasoning about resource usage. Rust provides lifetimes which I think is based on linear logic (see https://news.ycombinator.com/item?id=7061876). In theory, this gas thing should act as the metric you mentioned but it doesn't seem like it is implemented properly when it comes to how the fundamental building blocks of Solidity act with respect to the gas metric. The termination stuff in total languages I think has a ways to go in terms of general accessibility. Dependent types aren't the easiest thing to pick up.
Re:Ethereum is Doomed by wyager on Tuesday June 21, 2016 @01:54AM (#11943762)
Ah, that's an interesting idea. Static resource usage analysis instead of computation tokens.

> Dependent types aren't the easiest thing to pick up.

Look at liquid types. They're a lot easier to leverage in practice. Liquid Haskell is all just comments on top of a regular Haskell program.