Closed samdark closed 10 years ago
@qiangxue Great! Thank you very much.
Should it be removed
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
from https://github.com/yiisoft/yii2-coding-standards/blob/master/Yii2/ruleset.xml ?
@iJackUA It's already merged: https://github.com/yiisoft/yii2-coding-standards/pull/9/files ;)
@schmunk42 no, that's another line , it is still exist in rulesset.xml
The most reasonable indentation style is SmartTabs: indentation with tabs, alignment with spaces.
I’m against changing Yii style to spaces only :-(
And many modern IDEs and editors do it right.
@maximal that's not about usability, it is about overall consistency in PHP world.
@maximal can't agree more but the majority of people seem to love standards and stick to them without questioning whether it is useful or not...
interoperability is useful, much more then personal coding style preferences ;)
Agree with you. Framework in any given language, probably, should use current standard for this language (PSR-2 for PHP, for instance).
But, from the other hand, why did unreasonable standard remains real then? Standards sometimes became unuseful and vast majority of people have to follow them just to follow. Space-only indentation is relic of the past, when people don’t know about smart-tabs indentation.
@maximal it's a long term holywar that resulted in spaces decision withing php-fig. I prefer any decision to no decision regarding it.
you dont have to configure spaces in any editor in any os in any environment, they just look the same for everyone...
@digitalkaoz, anyway, I don’t know any situation when smart-tabbed text brokes its alignment.
Enough
I can't think of a less interesting topic to argue about.
This is turning into another sign that it's time to move on from github.
yes am also tired about discussing tabs vs spaces, it just doesnt matter, following a standard matters
i'm for tabs, coz IDE can be configured. I'm using tabs from c/c++ times at the deep past. Spaces is pain for "fast-fixing" outside of IDE and mostly always breaks such 'nice' formatting :(
But i'm for standard here. Anyways, i'm not going to patch framework alot, so for projects i will still use tabs :)
Sorry, but one more try.
Tabs advantages:
Spaces advantages:
Spaces became standard, yes. But that was strictly because people were unable to use tabs properly. That was 30-, 20-, 10-years-ago problem. But why are they unable to use tabs now, when IDEs are mighty?
The less we use tabs, the less chances they have to became standard. People now are just afraid to use them. It means that standard needs to be reviewed.
Sorry again.
That's the question for PSR, not for Yii. If there will be another standard with tabs we'll switch to it immediately.
@samdark, thank you, Alexander.
@maximal :+1: it's amazing standards keeps defending spaces nowadays... @samdark I hope so...you are a member of the PHP FIG, is still this discussion ( spaces VS tabs ) rising up time to time?
@lucianobaraglia yeah, it's still popping up from time to time but not that often and it's not as hot as it was.
@lucianobaraglia, thanks. I opened php-fig/fig-standards#264, but @pmjones closed the discussion. I think it’s time to fork PSR-2 to have more competing standards :-)
If you guys have any ideas, I’m open to requests — https://github.com/maximal/tab/.
@maximal spaces dinosaurs still rule the Earth... :neutral_face:
Hey, people! Why are you still using blank lines for readability? Maybe it's time to invent vertical tab? And why do we use spaces between words instead of \s+ ? One could config own IDE to show that symbols as exotically, as he'd like!
Seriously, i think tabs are not so widely used, because they are alone. One configurable parameter is not enough for introducing the concept of such a configurability. Maybe some day there will be more...
Why do you guys pay so much attention to this? There are a lot of much more important things to discuss
What a great fail this is. Way to ruin a great framework.
And yes, it is obviously a very important discussion, otherwise there wouldn't be an endless stream of opinions on the topic. If it wasn't important, the discussion would die out.
There will never be a common agreement on this. Either "side" of the discussion will be unhappy, while the other is happy.
+1 for keeping tabs, even if it's too late :P
@kotslon 1) Because blank lines apparently are fine as "vertical whitespace" for most people, otherwise there would have been more discussion about it. 2) Vertical tab already exists, check your facts before typing.. 3) Same as (1). Seems you just wanted to try making this more complicated than it is, which is rather pointless. The things you mention are clearly not an issue for people, so there's no use in bringing them up.
@alpharder Because people care a lot, and because someone brought it up again in #2743. If there are, as you say, more important things to discuss, then the spaces zealots shouldn't bring this up over and over again.
There's been so much bullshit in this thread that there's no way one can comment on all of it. And obviously it doesn't matter anyway since the decision has been made. Kudos to the pro-tab people for standing up for their beliefs.
With this, I'm done.
I can say I prefer Yii 1 coding style and didn't like this change, but during time after switching to PSR-2 I feel no problems using spaces instead of tabs.
That was right decision that removes another one barrier on the way of Framework growth and popularity.
See #2743, #9