[TYPO3-core] Change CGL for inline comments?

Dmitry Dulepov dmitry.dulepov at gmail.com
Mon Sep 24 13:27:56 CEST 2012


Hi!

Patrick Broens wrote:
> What is "proper" indentation?

:)

For me indenting comment on the same level means they belong to the code, 
which is on this level. See two cases:

===============================
	helloWorld();

		// If we foo, than bar.
	if ($foo) {
		bar();
	}
===============================

or

===============================
	helloWorld();

	// If we foo, than bar.
	if ($foo) {
		bar();
	}
===============================

In my personal opinion, the indent in the second example looks more 
logical. The eye goes straight vertically on one code level and justps 
right inside the next code level. In the first example it jumps right even 
on the same code level, thus breaking the logical indentation of the code 
block.

I understand that it is mostly religious question, so there is no point to 
argue :) I think we just choose whatever is more convenient and stick with it.


-- 
Dmitry Dulepov

Simplicity will save the world.



More information about the TYPO3-team-core mailing list