Proposal: bounded while loops #10041
-
Proposal: Bounded
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
I very much doubt that the language would introduce a construct for such a niche use case when there's a perfectly good way of doing it already. Also, these sorts of features tend to disappear in a cloud of disagreements about how exactly it should work and how (if at all) it should be customisable. Your idea of a built-in counter might work for some scenarios but you'll quickly find someone saying "I'm using a bounded while loop but under certain conditions this iteration shouldn't count" etc. That's why it's a much better idea that you simply maintain the count yourself so you can put the exact rules on it that you want. |
Beta Was this translation helpful? Give feedback.
I realise indeed this can be arranged way tidier. Is there a way to delete this post?