Hacker News new | ask | show | jobs
by mschuster91 1900 days ago
The thing is, the more complex a spec is (or rather, how much stuff it allows that will never be used), the bigger the danger is that somewhen down the line, this will introduce a security or other issue.
2 comments

I think the assumption that addition is commutative in any context simplifies the spec rather than makes it more complex.
It however is not "natural" for someone who doesn't know the obscure bits of history in a standard written many decades ago.

Someone writing, say, a static code analysis tool or an IDE may not assume that it is possible that in the expression `a[b]` a may be something else than a pointer / array.

> Someone writing, say, a static code analysis tool or an IDE may not assume

If you're writing a static analysis tool or an IDE then I think it's fine to expect you to read the spec.

But pointer arithmetic is not "obscure bits of history."
It's not an array trick, it's a definition of arrays.