Nim isn't C, `x = y` could have complicated behavior, so it's best that it
stays void. You could define the walrus operator in Nim with a template like so:
template `:=`(a, b): untyped =
let a = b
a
x := y := 3
while (y := fct(x)) > 0:
discard
Run
- How to rewrite nim programming langauge to be pythonic as possib... xigoi
- How to rewrite nim programming langauge to be pythonic as possib... moigagoo
- How to rewrite nim programming langauge to be pythonic as possib... HJarausch
- How to rewrite nim programming langauge to be pythonic as possib... lscrd
- How to rewrite nim programming langauge to be pythonic as possib... nocturn9x
- How to rewrite nim programming langauge to be pythonic as possib... nocturn9x
- How to rewrite nim programming langauge to be pythonic as possib... nocturn9x
- How to rewrite nim programming langauge to be pythonic as possib... slonik_az
- How to rewrite nim programming langauge to be pythonic as possib... HJarausch
- How to rewrite nim programming langauge to be pythonic as possib... moigagoo
- How to rewrite nim programming langauge to be pythonic as possib... Hlaaftana
- How to rewrite nim programming langauge to be pythonic as possib... Niminem
- How to rewrite nim programming langauge to be pythonic as possib... xigoi
- How to rewrite nim programming langauge to be pythonic as possib... mratsim
