Powershell: new keyword "loop"

Created on 1 Jan 2020  路  2Comments  路  Source: PowerShell/PowerShell

instead of for dracula for(;;) or while($true) it more lisible to use loop for infinite loop

loop {

}
Issue-Enhancement

Most helpful comment

@p0W3RH311 Also note that adding new keywords is considered a breaking change since someone may already have defined a loop command.

All 2 comments

Generally loops need a Goto or equivalent (like break) to exit are considered bad.

@p0W3RH311 Also note that adding new keywords is considered a breaking change since someone may already have defined a loop command.

Was this page helpful?
0 / 5 - 0 ratings