-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove protos and folding marks from .c files #5532
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
TSRM/TSRM.c
Outdated
|
||
/* {{{ */ | ||
/* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right; the comment should be removed altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thanks! I'll fix it up manually :) Probably there will be some other small glitches like this.
Zend/zend_closures.c
Outdated
|
||
/* {{{ proto mixed Closure::call(object to [, mixed parameter] [, mixed ...] ) | ||
Call closure, binding to a given object with its class as the scope */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to remove the empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried my best to remove empty lines that were added but I didn't always manage to do so :( I'll have another look though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just seen that there are way too many new lines added :/ So probably I'll have to retry as soon as we agree that protos/folding marks are ok to remove
ext/calendar/easter.c
Outdated
/* {{{ proto int easter_date([int year]) | ||
Return the timestamp of midnight on Easter of a given year (defaults to current year) */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to drop functions' descriptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I also wasn't exactly sure. But it seems that neither these descriptions are that useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, these "protos" should be removed, because they are just comments, and as such not rarely out-dated. Also, I believe these have been introduced before we had ZPP, and as such were useful in their own right. Furthermore, they are no longer used to generate the docs, to my knowledge. However, all that might better be discussed on the mailing list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I feel like proto comments are more wrong than correct nowadays :) We update the stubs, but we don't update the proto comments...
It might make sense to keep the description comment though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to redo the changes because many unintended new lines sneaked in despite my efforts, so I'll try to be considerate to those comments next time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a really pointless thing to do. Sure, by all means don't add new ones, and clean ones out when you're updating a bit of the code, but this just adds a mess of conflicts further down the line. I do not believe this should ever be merged.
@derickr Based on conversation in chat, you had two concerns about this change:
I'm not a big fan of only removing the folder marks when touching a piece of code, because it means that we mix style changes with functional changes (something we generally discourage), and because it means that the codebase will spend a long time in an intermediate state where some functions have folder marks and some don't, often in the same file. I don't think that is a good state to be in. |
2fcc3b3
to
25528e4
Compare
for someone like me, who use VIM as primary editor, folder marks are really useful. |
Looks like we don't have consensus here :( @laruence I also use vim as primary editor... Vim supports |
@nikic What I wanted to propose as soon as my other stuff is done is to only remove protos - both from c files and tests - and leave alone folding marks. Would it be a good middle ground for both sides? :) |
@kocsismate Sounds reasonable to me. |
I'm closing this since the changes were somewhat problematic. |
No description provided.