> no dick (or walrus) operator (for me it’s been a good sign that I’m not going to like the language, so far there were no false positives). This means that Go and Nim are out Not sure where they got that Nim has a walrus operator. Maybe because the syntax resembles Python? That'd make sense.
I was not familiar with the term, so I had to look it up. It's about code like this: a := b the `:=` looks vaguely like a walrus. The most common reference language seems to be Python [1]. The usage is for making assignment remain an expression, so you can do stuff like area = (width := get_width()) * (height := get_height()) or something, and have the top-level expression remain valid since the sub-expressions are a…
Since it was introduced, I have been looking but there has been only a handful of times where I could use it to write clearer code.
I'm curious if anyone actually likes it.
edit: A quick search shows that I do use it regularly in while loops, e.g.:
while result := my_fun():
...