Comment by drpixie
3 months ago
Ada has had something similar and very flexible since from the 80s ... like:
loop
Get(Current_Character);
exit when Current_Character = '*';
Echo(Current_Character);
end loop;
There's not that much new under the prog lang sun :(
I don't see why this needs a new construct in languages that don't already have it. It's just syntactic sugar that doesn't actually save any work. The one with the specialized construct isn't really any shorter and looks pretty much the same. Both have exactly one line in the middle denoting the split. And both lines look really similar anyway.