This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Assignment and a boolean operator #27
Comments
Not sure I agree. What's the benefit. |
What does |
The benefit is in visual separating |
@igor-korotenko |
Also I think the brackets improve similar situations with other comparison operators: val x = (100 > 200)
vs
val x = 100 > 200 But that does not apply to other operators. Complitelly OK: val x = 1 + 2
val y = a && b
val x = c or d |
Look like a quite cool idea and I see some visual benefits, but most of code we meet every day don't have this. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In a case of "assignment" syntax with a boolean expression
==
put brackets around the expression:Good:
Bad:
The idea is to visual separate
=
and==
The text was updated successfully, but these errors were encountered: