4 ms·
I agree that syntax is the hardest thing. Based on my experience tutoring, I would add the following (which was surprising to discover at first): the second ha
by YuriNiyazov 15y ago
I agree that syntax is the hardest thing. Based on my experience tutoring, I would add the following (which was surprising to discover at first): the second hardest thing is the order of evaluation. I've seen students write down
a = do_something1(do_something2())
and be unable to explain that do_something2() actually happens before do_something1(), and to see that the code is loosely equivalent to
b = do_something2()
a = do_something1(b)
- Locke1689 15y agoThe worst is when you're teaching C and you have to explain that void * a = do_something1(do_something2(), do_something3()); is not equivalent to int b = do_something2(); int c = do_something3(); void * a = do_something1(b, c);
- YuriNiyazov 15y agoBecause the order of evaluation of arguments is not defined?