Hacker News new | past | comments | ask | show | jobs | submit login

What a lovely comment, explaining not just the why but also, in this case, the 'how' because its not obvious how to derive the code from the requirement so actually explaining how is worth it.

But then I scrolled down and saw it verbatim just a few lines further down https://github.com/behdad/cairo/blob/color-emoji/src/cairo-p...

Why is CheckMitreHight() not a function? :)




And a bunch of other places in the codebase from memory (cairo-path-stroke.c, cairo-path-stroke-polygon.c and cairo-path-stroke-tristrip.c). And there's a bug in there too because they're working in the wrong space so the checks are applied after outer transformations [0].... but it's still a great comment! :-)

[0] https://bugs.freedesktop.org/show_bug.cgi?id=100703




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: