Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Chained method calls being difficult to debug does not necessarily mean using a debugger. It can mean difficult to insert clarifying code in the middle of the chain: print statements, or additional value checks, and so on.


Chained methods also don't diff as clearly (the one liners anyway).


They do on GUI diff tools by using different colors.


It's still not as clear as just splitting across lines, plus in most tools you need to explicitly indicate you want to highlight word diffs.

But more abstractly speaking: are chained calls, from the POV of a human that didn't write it, or wrote it two months ago, more readable than a number of statements on multiple lines?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: