Hot answers tagged

4 votes

Breaking down the operations when auto-casting gets complex

I'd maybe suggest an exercise of splitting these kinds of statements up into multiple variables and lines of code. So take this line: ...
4 votes

Breaking down the operations when auto-casting gets complex

I suspect that you handle such situations by informally building the parse tree of the expression in your mind. Maybe not all at once, but a bit at a time, perhaps. I'm not a cognition expert, of ...
  • 35.4k
3 votes

Breaking down the operations when auto-casting gets complex

I think the student's problem is not with types, but first with the parsing of complex expressions (not to be confused with the tracing of it's evaluation). Mentally building the abstract syntax tree ...
1 vote

Breaking down the operations when auto-casting gets complex

You say “when he is finished, he no longer fully understands them.” There is a good practice to write self documenting code. This is done not with comments, but with well named entities (methods, ...

Only top scored, non community-wiki answers of a minimum length are eligible