More consistent naming #324

Open
opened 2020-05-20 13:21:44 +00:00 by matthijskooijman · 1 comment
matthijskooijman commented 2020-05-20 13:21:44 +00:00 (Migrated from github.com)

It seems that right now, there are quite a few naming styles in use. In particular:

  • CSS uses dash-separated, withoutseparator, underscore_separated and camelCase in different places. camelCase seems the most used.
  • Functions and methods seem to pretty consistently use camelCase, though some functions use a hypha_ prefix, while a lot of them do not.
  • Classes seem to use UperCamelCase consistently, I think.

It would be useful to make some choices here and write them down, so we can at least make sure that newly added code is consistent with that style (and maybe slowly convert older code too).

It seems that right now, there are quite a few naming styles in use. In particular: - CSS uses `dash-separated`, `withoutseparator`, `underscore_separated` and `camelCase` in different places. `camelCase` seems the most used. - Functions and methods seem to pretty consistently use `camelCase`, though some functions use a `hypha_` prefix, while a lot of them do not. - Classes seem to use `UperCamelCase` consistently, I think. It would be useful to make some choices here and write them down, so we can at least make sure that newly added code is consistent with that style (and maybe slowly convert older code too).
matthijskooijman commented 2020-10-05 16:07:51 +00:00 (Migrated from github.com)

On argument against using dash-separated in e.g. CSS, is that PHP variables cannot use -, so using that makes a 1-on-1 correspondence between CSS classes and PHP variables impossible.

On argument against using `dash-separated` in e.g. CSS, is that PHP variables cannot use `-`, so using that makes a 1-on-1 correspondence between CSS classes and PHP variables impossible.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#324
No description provided.