Akuli / jou

Yet another programming language
MIT License
12 stars 4 forks source link

walrus operator := #284

Open Akuli opened 1 year ago

Akuli commented 1 year ago

In new versions of python you can do while foo := some_function(). In C, this is very common, e.g. while ((c = getchar()) != EOF).

Jou should also have a := operator. This is even more important for Jou than for Python, because Jou aims to be similar to C.

Moosems commented 10 months ago

Yes please! I like how python uses parentheses for it to show it is a complete and separate statement. One thing I'd make possible in Jou is allow it to set attributes (I.E. while ((self.foo := bar) == bar): ...).