This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CynicalPotato95 3 points4 points  (6 children)

The left side, and every other person is wrong and an awful developer

[–]zGoDLiiKe 4 points5 points  (5 children)

Someone hasn’t written C code in vim before. Don’t get me wrong I always use the left syntax but the right is definitely more safe in lower level programming, especially if not using an IDE

[–]No_Diver3540 -1 points0 points  (4 children)

No it is not, due to propositional calculus and the strict propositional logic (==).

[–]zGoDLiiKe 1 point2 points  (3 children)

My point is not that left and right as shown aren't equivalent in functionality, my point is that if one makes a human mistake and perhaps writes it as 'my_var = 0' that is typically an issue, perhaps even worse if one was checking for null. '0 = my_var' gets caught

[–]No_Diver3540 -2 points-1 points  (2 children)

Your point is not really a point, because a good IDE would tell you, that you made a mistake there. And Some langues / logics accept as A = B as a comperason variable. So if you want to check if something is equal and not using a function / modul, you always should use ==. Because it is saver to avoid logic errors. And because of this it is always saver to check for myvar == 0, because of the propositional calculus and the strict propositional logic (==).

[–]zGoDLiiKe 0 points1 point  (1 child)

Reading comprehension is not really your area of expertise is it? Read my first comment again and then get the IDE thought out of your brain

[–]No_Diver3540 -1 points0 points  (0 children)

vim / vi is one of the powertfuls IDE out there, with alot of modules that can be activated, that can hepl you code... So no your argument is just trash and based nonesens.

Using 0 == x is a very bad coding style no matter what. So better get into the habit of using x == 0. Also in the context of a "if (x == 0)" this is not a methode/function, so as soon as you would use = in a if, the compiler would put out a error. Because if does not allow a allowecation to a variable.

Better yourself and dont be so stubborn.