> 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 assignments that remain expressions, i.e. the assigned value is also the result of the expression.
IIRC he stepped down because he thought it's a good feature and people pointlessly moaned about it. Not because he thought it's controversial and has enough.
I used it a small handful of times. But it also seems like quite a source of footguns. Many examples here: https://github.com/satwikkansal/wtfpython rely on the misuse of the walrus operator.
Go uses "==" for equality checks, "=" for assignments, and ":=" for "declaration/assignment with type inference" - so it's different from both Python (you can use ":=" as part of an expression in Go too, but you can also use "=") and Algol/Pascal (where it's used only for assignment).
In math = is used for equality and := for definition[1] which is probably the closest thing to assignment in a programming language. That is why Pascal and similar languages use = for equality only and := for assignment.
That always made more sense to me than = for assignment and more =s for different kinds of equality, but in the end this syntax discussions are always just bike-shedding.
Not sure where they got that Nim has a walrus operator. Maybe because the syntax resembles Python? That'd make sense.