-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 0.9.0 #177
Version 0.9.0 #177
Conversation
…ake the change to namespaces
Additional unit tests
Conflicts: changelog.txt
Fancy web interface for samples
…he first word, e.g. 'Page {PAGE}'
@gabrielbull, I wouldn't agree with you. :) My opinion is based on the followed research results. Regarding constants.
Regarding functions.
That's the right link. It means the same as with constants. If you look at some unqualified function name, you have no idea whether it's a local or global function. Even its name looks like global ( And finally, classes have no fallback to global namespace, but functions and constants have. It's a waste of brain power and of your memory resources if you prefer keeping this in your mind permanently. We're all human beings, and we make mistakes. Somebody can easily use local function/constant instead of global one. Moreover, you will always have to make sure that you deal with global/local constant or function. Using the leading backslash everywhere (classes, constants, functions) gives us the same logic for all global calls and thus saves a lot of time, attention and decreases bug appearance probability. Here is what really drives me crazy (not leading backslahes):
If you ask me what I vote for, I vote for increasing code readibility, time and attention savings, and minimum of bugs. |
Well, if we're to take a vote, I vote we don't ever use backslashes for PHP functions and we use backslashes or the |
@Progi1984, @ivanlanin, what do you think? Another bad idea? |
Why you say another, nobody said the PSR-4 thing was a bad idea. It was a good idea, we're just not yet ready ;-). |
Coding standards are always become source of debate. I like it that we don't use our own standard and use existing PSR standard instead. Still, we have to face this issue :) IMHO, this is just a matter of preference. Yes, there are some valid technical issues that were mentioned, but I think we can use either with or without leading backslashes. My personal preference is always to write my codes in the shortest way as possible/allowed, i.e. I prefer without leading backslashes. I've joined teams with different coding styles and I'm fine with any decision made by the PHPWord team :) |
OK, let it be so. I will remove the backslahes when @ivanlanin is done with refactoring. |
No description provided.