[Info-vax] BASIC (and Horizon)
Arne Vajhøj
arne at vajhoej.dk
Fri Feb 2 07:56:33 EST 2024
On 2/1/2024 11:51 PM, Lawrence D'Oliveiro wrote:
> On Thu, 1 Feb 2024 22:44:56 -0500, Arne Vajhøj wrote:
>> To quote from Linux kernel coding style doc:
>>
>> <quote>
>> Now, some people will claim that having 8-character indentations makes
>> the code move too far to the right, and makes it hard to read on a
>> 80-character terminal screen. The answer to that is that if you need
>> more than 3 levels of indentation, you’re screwed anyway, and should fix
>> your program.
>
> I think this is a load of nonsense.
Apparently Linus doesn't think so.
And while few may have worded is this blunt, then it is
generally accepted that deep nesting is a code smell and
should be refactored and code moved out to functions/methods.
The specifics may depend a little on the language. 3 may
make sense in C, but VB.NET may justify a higher value
(namespace and class add levels before even getting started
and try catch blocks plus using statements also tend to
add more levels without the levels impacting flow).
Arne
More information about the Info-vax
mailing list