June 10, 2021
On Thursday, 10 June 2021 at 17:53:17 UTC, Steven Schveighoffer wrote:
> You're not wrong, but it doesn't fix existing code which might not have done it that way.

Now that I think about it, array bounds error is an array contract error, which will make most errors contract errors, with little left for other errors.
June 10, 2021
On Thursday, 10 June 2021 at 17:53:17 UTC, Steven Schveighoffer wrote:
> You're not wrong, but it doesn't fix existing code which might not have done it that way.

The whole idea of executing imperative code in contracts is pretty daft to begin with, makes it much harder for the optimizer to get rid of it.

Ideally a contract should just be a simple boolean expression that the calling context would get rid of by proof/optimization.

How many people use contracts as implemented?

June 10, 2021
On Thursday, 10 June 2021 at 19:20:23 UTC, Kagamin wrote:

> Now that I think about it, array bounds error is an array contract error, which will make most errors contract errors, with little left for other errors.

Contracts are not a mandatory part of the semantic, they can be wiped out leading to inconsistencies when executing code.

Therefore, we still need the other errors. Anyway, why should an OutOfBounds error not be a subtype of an AssertionError?
June 12, 2021
On Wednesday, 9 June 2021 at 21:40:45 UTC, Walter Bright wrote:

>
> As I remarked, it makes the code easier to reason about.

Sounds unreasonable to me.
1 2 3 4 5 6
Next ›   Last »