odin-lang / odin-lang.org

http://odin-lang.org
22 stars 81 forks source link

Add operators: &&= ||= to the Overview with explanation of their functionality #165

Closed ghost closed 6 months ago

ghost commented 7 months ago

These two operators

&&=
||=

are not listed in the Overview: https://odin-lang.org/docs/overview/#operators

Please consider adding them to the Overview with a small example since they are a bit more complex in nature.

flysand7 commented 7 months ago

We don't list any "compound" operators like +=, -=, or &~=. Perhaps a mention of them should be added to the overview, especially &&=, ||= and &~=.

mahSource commented 7 months ago

Note these two are listed in the GitHub Wiki but not in the Overview. Might be nice to make that consistent and like flysand7 noted in their comment a mention on their use, just a sentence might be helpful since "compound" operators are usually not obvious in the way they operate and/or operate differently from language to language. This way the Odin users will know these operators are available (because the Overview seems much more used and available than the wiki at this point) and also understand how they work. Thanks for the consideration.