btandresen/cappuccino — comment on commit 0f8f4d435cd250a2d6442548a4f81e6698331b67
File: AppKit/CoreGraphics/CGContext.j line 531
By btandresen:

Thanks for the code review. This file has a large conditional section, from BEGIN CANVAS IF at line 105 to END CANVAS IF around line 497. The CGStrokeRectWithWidth function was defined only in this section, which meant it was unavailable if the browser has the canvas feature. I considered a few solutions:

* Close the conditional section before the function, and start another one right after. I thought this would make the overall structure of the file even more confusing.
* Copy this function to CGContextCanvas.j, Would prefer not to duplicate code.
* Move all of the non-canvas functions to a different file (CGContextVML.j?). Leave CGContext.j with only those functions that are useful across both canvas and VML implementations.
* Move the function outside the conditional section.

I implemented the fourth, but I like the third much better. What do you think about the third?