Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Correctness and composability bugs in the Julia ecosystem. Parent comment
Yes, actually. While I have approximately zero knownledge of Julia specifically, a language-independent example might be:
B = OneBasedArray(length(A)) A_ = iter(A) for i in 1:length(A) { B[i] = pop(A_) } assert(iter_isdone(A_))
> that pattern followed by usage of i to index into A inside the loop?
I can't think of any legitimate uses for that, but there probably are some; make sure to allow:
len = length(A) for i in 1:len ...
There are no comments on this comment yet.
Yes, actually. While I have approximately zero knownledge of Julia specifically, a language-independent example might be:
And if that looks contrived... yes; it is contrived.> that pattern followed by usage of i to index into A inside the loop?
I can't think of any legitimate uses for that, but there probably are some; make sure to allow:
as a `if( (x = foo()) )`-style workaround.