I'm looking at the code and just cannot agree. If I look at a command like "TRotateFloatCommand.DoIt" in URotate.p, it's 200 lines long without a single comment. I look at a section like this and there's nothing literate about it. I have no idea what it's doing or why at a glance:
pt.h := BSR (r.left + ORD4 (r.right), 1);
pt.v := BSR (r.top + ORD4 (r.bottom), 1);
pt.h := pt.h - BSR (width, 1);
pt.v := pt.v - BSR (height, 1);
pt.h := Max (0, Min (pt.h, fDoc.fCols - width));
pt.v := Max (0, Min (pt.v, fDoc.fRows - height));
IF width > fDoc.fCols THEN
pt.h := pt.h - BSR (width - fDoc.fCols - 1, 1);
IF height > fDoc.fRows THEN
pt.v := pt.v - BSR (height - fDoc.fRows - 1, 1);
Just breaking up the function with comments delineating its four main sections and what they do would be a start. As would simple things like commenting e.g. what purpose 'pt' serves -- the code block above is where it is first defined, but you can't guess what its purpose is until later when it's used to define something else.Good code does not make comments unnecessary or redundant or harmful. This is a myth that needs to die. Comments help you understand code much faster, understand the purpose of variables before they get used, understand the purpose of functions and parameters before reading the code that defines them, etc. They vastly aid in comprehension. And those are just "what" comments I'm talking about -- the additional necessity of "why" comments (why the code uses x approach instead of seemingly more obvious approach y or z, which were tried and failed) is a whole other subject.