HN user

valyard

49 karma
Posts1
Comments5
View on HN

In any IDE you can set up code formatting options. By pressing a button you are essentially applying this CSS you are talking about. You can write however you want but when saving a file you (either manually or automatically) should execute reformatting in IDE.

I agree with you that having CSS-like option would be better, since code is data, CSS is formatting options. But you'd have to teach all other tools you use to work with this CSS approach. For example for git source files are just text. Git doesn't understand code semantics. For its diff routine tabs changed to spaces == every line of code changed.

There's no much use for a VCS if every commit changed everything.

I don't mind improper naming because all the functions are essentially just nodes in code graph. Of course it helps if you can figure out what they do just from their names, but you have to read code anyway.

Same for excessive docs. Sometimes you can find huge walls of text before every function, or meaningless javadoc comments which say that function GetData "returns data". But those are usually needed for 100% docs coverage which might be enforced by corporate policy.