Closed kenjis closed 9 years ago
@kenjis you made a huge mistake, because a war starts now. There are several reasons against PSR2. I suggest you reading the last few year IRC logs. IMO the biggest reason is readability. But I leave it to @WanWizard to explain it. It is time to explain for the public why we don't follow PSR2.
I think that has been discussed numerous times over the last few years.
My general problem with the PSR's is that they are no standard. They are a few people, mainly from the "symfony" corner of the web, that have decided that these should be "standards" everyone should use. People that have a different opinion and want to voice it are not welcome. FuelPHP was denied membership because of this, which is odd compared to the ease in which others are accepted.
Now, PSR-2 in particular is not a standard at all, it is a coding style guide.
Which, like any other style, is every personal. The biggest problem I personally have with it is, as @sagikazarmark already said, readability. It takes a developer simply more time to understand code written in "symfony style", it is too compact to see in a glance what the code is all about.
IIRC I found a study about using tabs increases readability. Do you remember @WanWizard?
I don't like wars. This is just a discussion.
This issue is about PSR-2. It is about coding style.
Relax, just kidding. :)
Since it's clear that we are not going to switch to PSR-2 I am closing this issue.
it's clear that we are not going to switch to PSR-2
Would you please explain why?
PSR-2 and custom (Fuel) coding style, they have both pros and cons.
@kenjis readability. (Damn, I can't find that study about why tabs are better than spaces)
@stevewest maybe a blog article with explanation? (IIRC you were excited about writting posts, weren't you)
@sagikazarmark when I have the time for them :wink: But might indeed be a good idea as this question keeps coming up. As for tabs vs spaces I much prefer tabs mostly because you can change the size that they render at, with spaces you cannot, so the dev has full control over how "deep" the indentation is without effecting the viewing pleasure of others.
@sagikazarmark Of course I know the word "readability", but I don't get what is better. Because I use 4 spaces for a tab in my editor, so 4 space indent (PSR-2) and tab indent are the same to me.
It is not just spaces, but there are some more differences, like new line after control structures. Read @WanWizard's comment about this.
Also, we gave a reason why we use tabs. What are the reasons for using spaces (except a "few" people decided to do and called it a standard)?
I know you guys don't like PSR-2, but more and more PHP projects adopt PSR-2. It is getting to become PHP de-facto standard.
Why don't you reconsider to adopt PSR-2?
Ref, http://bakery.cakephp.org/articles/jameswatts/2014/12/16/cakephp_3_to_fully_adopt_psr-2