-
Notifications
You must be signed in to change notification settings - Fork 1.3k
variable naming style #399
Comments
I thought this was a common C++ convention — underscores for local variables and properties, camelCase for function names. |
That's the lead I've been following in the project, but I don't have strong feelings either way. In Cocoa, camelCase is used for both. |
@mourner This is about variables only. We seem to be more consistent with function names. |
The current adhoc conversion from old_style variable names to newStyle is rather annoying and confusing. It is too easy to keep using the old_style because you copy some code etc. when adding new code. We need to carefully go through every file and change everything at the same time. Otherwise with branches and merges happening all the time we will never switch over completely and be left with a mix which is just bad. |
We're getting to be in good shape here. Let's continue to make things camel-case when we encounter variables that aren't. |
I would like to suggest suffixing class attributes with a |
@tmpsantos If we were starting from scratch, I'd agree. But none of the existing code uses that convention, and in fact much of it uses a |
We're currently using a mix of camel-case and underscore variable names. My vote is for camel-case simply to be consistent with JS.
The text was updated successfully, but these errors were encountered: