Baikal icon indicating copy to clipboard operation
Baikal copied to clipboard

Globally change # comments to //

Open markc opened this issue 7 years ago • 5 comments

Is there any interest in changing ALL the comments in all PHP files from # to //? If so then I'd be prepared to have a go at it.

markc avatar Nov 30 '17 06:11 markc

Is there any benefit?

yahesh avatar Feb 10 '18 22:02 yahesh

I was in the middle of trying to provide a reason when you closed the issue. The only tangible benefit is summed up in this quote from the php-fig repo where none of the code examples use a hash.

The intent of this guide is to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.

https://github.com/php-fig

markc avatar Feb 11 '18 01:02 markc

I have no opinion on this

untitaker avatar Feb 11 '18 01:02 untitaker

Okay, so that's not quite a "won't fix" so would you object to a patch that globally converted all # chars to a more conventional // ?

It certainly had an impact on me when I tried to read through the code. Dare I say "it made my eyes bleed" seeing all those # chars. It's not only a personal preference thing but, as that quote points out, it would help to "reduce cognitive friction."

markc avatar Feb 11 '18 01:02 markc

It's probably worthwhile just running the same CI / prettify rules as all the other sabre/* projects and have this done automatically.

evert avatar Apr 27 '19 16:04 evert