-
Notifications
You must be signed in to change notification settings - Fork 7.8k
zend_inheritance.c: make a bunch of pointers const
#15934
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
Conversation
Thanks @DanielEScherzer! Before continuing this work, I think it would be good to have some consensus on how we want to continue on this matter. In reality, I don't think local I'm not sure where this conversation should be held. The ML is generally not a great place, because most people there aren't C developers and will still generate a lot of noise. |
Maybe @cmb69 @arnaud-lb @nielsdos can pitch by sharing their opinion. |
In my opinion, this is not only about the compiler, but also for developers reading the code. One particular issue are pointers, though. Some reading Even for local variable declarations either form of constness (or even both) can make sense, but I don't think it would be a good idea to go through the whole code base and change that. It might be better if this is part of some larger refactorings for particular parts of php-src; there is still a huge amount of code suffering from accidential complexity, which could be improved. |
I agree const is mostly for developers. In fact, I don't think the C compiler really uses the fact something is const since you can just cast it away (I think it's not allowed in C++ though). |
Sure - I like to write code, so if you want to point me to the parts that need refactoring, I'm happy to make an attempt |
No description provided.