Re: [framework-discuss] Codestyle

[ Thread Index | Date Index | More lists.aurorafoss.org/framework-discuss Archives ]


I agree with this style, except the tab being 8 spaces long. Honestly it's too much whitespace and ends up showing less code on the screen at once..

October 12, 2019 9:28 PM, "Filipe Laíns" <lains@xxxxxxxxxxxxxx> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On Sat, 2019-10-12 at 17:29 +0100, Luís Ferreira wrote:
> 
>> - And some other codestyle sections you feel uncomfortable with.
> 
> What does this mean?
> 
>> My opinion in Tab indentation:
>> I like the idea of use tabs for indentation and spaces for alignment.
>> For each file extension, we need to define a file on infrastructure
>> repo with the "standard" way of indentation.
> 
> You need to clarify things. Use spaces for alignment in which
> situations? To align for ex. comments at the end of a line? Or perhaps
> to align for ex. function parameters?
> 
> To align comments, using spaces is just horrible. We should use tabs,
> like this:
> ```
> #define SOMETHING /* My comment */
> #define SOMETHING_ELSE /* Other comment... */
> ```
> 
> But to align function parameters, using spaces for fine alignment is
> desirable:
> ```
> void my_function(int my_very_long_variable_name_blah_blah_blah,
> int my_other_variable);
> ```
> 
> I suggest we adopt the same codding style as the kernel, which is
> widely used across a big number of other popular projects.
> 
> In a nutshell:
> - Use tabs for indentation
> - Tabs are 8 spaces long
> - Use tabs to align as much as you can
> - Use spaces for fine alignments (like my 2nd example)
> 
> I am not sure if the tabs and spaces in the examples will get messed up
> by the email server, but I hope not.
> 
> Thanks,
> Filipe Laíns
> -----BEGIN PGP SIGNATURE-----
> 
> iQIzBAEBCAAdFiEE0jW0leqs33gyftiw+JPGdIFqqV0FAl2iN3YACgkQ+JPGdIFq
> qV1OkhAAqU7xbmbxv3vG5UAF/Pf/zEY2/Sx3DUSSnX+xRY8ASw+/dEQahNU//jUn
> pe0MYz2Se5R5XNm3SsTzJDukHSscdGk6ZI2inl51PIgtKCkQyWq+9nzPX3Inh2Pp
> RTv3lMdstYYQtFlQ2U7QO4EnIobUB61xPFSr0u8eg36lO4Z3wKyOyQX4RLnqVt8j
> uB9jz9pyBOdl/kDYtR7WFnsW0Y3O2iA9+WeRJMz7lm9D64vFo2pfBfaX5lThc1+O
> 6QHrVmPjkWZ9wAuv1buqwPWPwYkZlGCjg0T/CeQRCLrBu3L21zCEfQNvUDSYTm7b
> huAmGEd/J/20CD3nVXh/iHJBXqkooJrBeS8XO0RquEGFZAJUd1+YtKBfdYMNAyDc
> mLvZiCmtEqr0J7vgWdQrIFnx5/Ia4vHhEWK0byh4XkTujTatoXOp02tEDsPi6AHU
> wSyxd1lqJGq013QmHut8Hq87xgFb/by4oFBt1LvshBzJz62Np1ug8UQ0wantZbGk
> zOSHWcM4DOLFSbFSK6ldX/VK9q/O9BopchCFFeIKqng6kD6XaKMbXaY2Mtywsrw3
> b4jV3oJRfjYVaXZdXyePoY5uJXu5iqzDRdB2La5vKhzxcWovkHyg0qv+V7uddVFU
> YeE8o5mGDemo2YxNTcDworwbOcxPOjc5dAe33wgaVgZkkH5VFqM=
> =bpzx
> -----END PGP SIGNATURE-----



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/