News for hackers. Stuff that matters.
Re:Go Naming Conventions: A Practical Guide by bborud on Saturday March 28, 2026 @11:35AM (#47555538)
If your loops are so long you can't fit them on one screenfull you have much more fundamental issues.
Re:Go Naming Conventions: A Practical Guide by zer00eyz on Saturday March 28, 2026 @12:18PM (#47555956)
You arent wrong, but it is not an absolute.

Furniture maker, house framer, finish carpenter are all under the category of woodworking, but these jobs are not the same. Years of honed skill in tool use makes working in the other categories possible, but quality and productivity will suffer.

Does working in JS, on the front end teach you how to code, it sure does. So does working in an embedded system. But these jobs might be further apart than any of the ones I highlighted in the previous category.

There are plenty of combinations of systems and languages where your rule about a screen just isn't going to apply. There are plenty of problems that make scenarios where "ugly loops" are a reality.

Re:Go Naming Conventions: A Practical Guide by bborud on Saturday March 28, 2026 @12:51PM (#47556281)
I didn't say it was an absolute. But once a scope grows to the point where you have to navigate to absorb a function or a loop, both readability and complexity tends to worsen. As does your mental processing time. Especially for people who "scan" code rapidly rather than reading it.

The slower "readers" will probably not mind as much.

This is why things like function size is usually part of coding standards at a company or on a project. (Look at Google, Linux etc)

Re:Go Naming Conventions: A Practical Guide by laserlight on Saturday March 28, 2026 @12:23PM (#47556004)
person.Age is easier to understand than p.Age regardless of the loop size.
Re:Go Naming Conventions: A Practical Guide by mysterymath on Saturday March 28, 2026 @08:35PM (#47559370)
Another point of view: ideally it would just be "Age". But in languages that don't have the ability to "open" scopes, one might be satisfied p.Age, being "the age". I've also seen $.age and it.age, in languages with constructs that automatically break out "it" anaphora.