i'm afraid i don't like this suggestion as it is :P i've mentioned something similar on the $for() discussion.. but i think the most useful implementation of an identifier like $while() or $for() is one that coincides with the general definition of an identifier (returns a value to be used in a command)
so i don't think it should work like: $while(condition,commands) because that's quite sloppy, would probably be a pain to handle multiple commands, and the current while ( ) { } structure we have for while loops just makes a lot more sense for this purpose imo

however, a $while() that actually functioned like an identifier would be nice:
//var %x = 1 | echo -a $while(%x <= 5,%x,inc %x)
perhaps the syntax isn't the greatest, but how it could work: 1st param is the condition, middle parameter is what to return to the calling command, and last parameter is an optional command so the loop may progress.
so that would theoretically perform 5 echos and echo the numbers 1 to 5
$for() working this way would probably be better, i believe i suggested something like:
//echo -a $for(var %x = 1,%x <= 5,inc %x,%x)
so last param is what to return each time, i.e. it would have the same effect as the $while() mentioned before
all i'm saying is, if we did have control structures in the form of identifiers like $while $for etc. then it would make sense if their purpose was to return values and not perform commands (since while ( ) { } and for ( ) { } would be most suitable for that)
hope that makes sense