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

It's using a somewhat-obscure guarantee that doesn't come up in normal usage of the function - namely, that it will always get the iterator values in left-right order.


it depends on the kind of code you write. i guess if you're writing web server stuff, documenting this makes sense. but in maths-related code, it's pretty standard. you use something very similar to transpose matrices, for example.

(and the original article is dealing with coords in graphics, which is "maths-related code" in my book, but perhaps not in everyone's)


The original source is taken from a medical image DICOM viewer. In my limited experience as a medical physics student, the people working with these tools would really benefit from a comment explaining the code. They are most definitely not coders, most of them having barely done anything more than write a few matlab scripts.


This is hardly a typical environment. All code would be challenging, even commented code. Excessive commenting would be necessary: write the program again in English.




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

Search: