3 ms·
I presume that if you are learning something, you follow an instructor, a textbook or some kind of tutorial. Before learning conditions you should already know
by DeathArrow 5y ago
I presume that if you are learning something, you follow an instructor, a textbook or some kind of tutorial. Before learning conditions you should already know that = means attribution, not testing for equality.
I'd rather blame the quality of learning resources or student lack of attention here than the language design if someone mistakes = for equality operator.
- goto11 5y agoBad language design is not the fault of the student. After all, languages exist which doesn't have that problem.
- dunefox 5y ago> Before learning conditions you should already know that = means attribution, not testing for equality. Depends on the language. F# and CL, for example, would like a word.
- SavantIdiot 5y ago> I'd rather blame the quality of learning resources or student lack of attention here than the language design if someone mistakes = for equality operator. I see you don't have much experience with other programming languages, or you would have known that "=" is the equality operator in BASIC, Pascal, SQL and Excel... just to name a few of the most common occurrences where beginners -or- large-scale deployments would encounter this. That is the entire point of this paper, it uses C as an example, but the concepts are the same.
- ModernMech 5y agoMaybe if it were a single student, but this is a problem that has persisted across generations of students. I'm a fan of blaming tools for being poorly designed rather than the sad student who has to suffer using them. All their lives these students are told that "=" means that the left hand side and right hand side are equivalent. Then we give them a tool that throws the well-understood semantic meaning of the symbol out the window (for no good reason, mind you), and then you say we are to blame the student for being confused?
- iudqnolq 5y agoThe other symbol is also behaving in an unexpected way here. I can't think of any language that allows 10 < y < 20.