index, value := with
i := 0
count := len(haystack)
loop
while i < count else not_found
elem := haystack[i]
if is_special(elem) then continue
if match(elem, needle) then break found(elem)
// could also have been
// while not match(elem, needle) else found(elem)
// until match(elem, needle) then found(elem)
always
i = i + 1
on not_found
-1, _
on found(result)
i, result // "i" is in scope here, but not "elem"
...
That, I believe, is one of the most generic forms of a loop, with a pre-header for declaring loop-local variables, multiple exit points (that accept parameters!), flexible condition checking ("while/until" being syntax sugar for "if ... then break ...", "continue" is "goto" the "always" block), and expanded space for the increment statement — and AFAIK no modern language supports it.I mean, if you are making a new language, that's your chance to not stick with the old and tried stuff but try something more adventurous, like this loop device from Knuth's old paper.