# Assignment not allow in while expression?

**URL:** <https://discuss.kotlinlang.org/t/assignment-not-allow-in-while-expression/339>\
**Category:** Uncategorized\
**Created:** [January 5, 2013, 4:36am UTC](https://discuss.kotlinlang.org/t/assignment-not-allow-in-while-expression/339 "2013-01-05T04:36:08Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![abreslav](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/abreslav/32/8279_2.png) [@abreslav](https://discuss.kotlinlang.org/u/abreslav)\
**Post date:** [January 9, 2013, 6:37pm UTC](https://discuss.kotlinlang.org/t/assignment-not-allow-in-while-expression/339/5 "2013-01-09T18:37:20Z")

</div>

To be honest, the only use case for this idiom I (or my colleagues) ever came across is the one you mentioned in the post. Expressions with side effects are generally discouraged, so I think we do well enough in this case.

---

_[View the full topic](https://discuss.kotlinlang.org/t/assignment-not-allow-in-while-expression/339)._
