Indenting standards religions K&R, whitesmiths etc

thinkunix thinkunix at zoho.com
Wed May 31 21:39:40 UTC 2023


matheus via Digitalmars-d-learn wrote:
> On Wednesday, 31 May 2023 at 16:24:38 UTC, Cecil Ward wrote:
>> ...
>> So my question: would I get lynched for the following? (below)
>> ...
> 
> I don't know nothing about all this but looking your example code, I 
> write and I'd prefer to read something like this (Editing your own code):
> 
> 
> pure nothrow etc T foo(T, T2)(in T param x,in T2 param y)
> if (template-qualification-whatever) in {
>      static assert(…);
> }
> out (ret){
>      …
>      assert(test ret);
> }do{
>     blah
>     if (test) {
>        if-body
>        …
>     }
>     back to main block
>     …
>     …
> }
> 
> Matheus.

+1 here.  I think Matheus's code is much easier to read.
Code that is easy to read is easier to understand.


More information about the Digitalmars-d-learn mailing list