Skip to content
Discussion options

You must be logged in to vote

This was a design decision from the beginning due to how often this ends up being a bug for people. I myself just had such a bug because i wrote if (existing = newVal) in C++ because i was intending to do an == check, but ended up with an assignment, with a conditional check on the value of that assignment.

I think there should be a preprocessor instruction or compiler flag for that.

This would create 'dialects' of the language, and that's something the language team does not want to do (esp. for something as narrow as this).

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #2459 on October 26, 2020 11:28.