4 ms·
I've come recently across arxiv 2604.20911 which claims "do" rules persist much better then "don't" rules.
by yehoshuapw 1mo ago
I've come recently across arxiv 2604.20911
which claims "do" rules persist much better then "don't" rules.
- embedding-shape 1mo agoAlright, what you'd put instead of "Don't add any code comments anywhere"? I agree with the general guidance, but it's a general one and not applicable for everything. Some things cannot be expressed in a "do" way rather than "don't".
- yehoshuapw 1mo agoI don't know. I fully agree, and never did really try out this in depth yet. I suspect rules with negations are not the same as don't rules, but unknown if really true, if so: "when writing code do not add comments, code should not need it" may work
- embedding-shape 1mo agoYour proposal is still a "Prohibition-type constraint" that the paper you linked earlier say "isn't good". Some of these constraints we want simply aren't possible without adding "do not" somewhere in the line, even if you prefix/suffix it with other stuff, as you noticed yourself :)
- wongarsu 1mo agoI don't think changing "don't" to "do not" is what the paper authors had in mind I use things like "Your code should be self-documenting, so as to require as few comments as possible. Add comments to explain "why" or give important context not apparent from the code itself, but keep them to necessary comments only" But that's a much laxer rule. I don't think you can truly express "no comments, ever" without a "don't" rule.
- sandos 1mo agoDo add only code free from any comments.
- gozucito 1mo ago"Do write comment-less code" ?