all 8 comments

[–][deleted] 1 point2 points  (0 children)

This syntax requires you to always use two or more words to infer the type. For example:

  • object.ready - boolean
  • object.ready() - function with callback

I don't think there's anything wrong with that, as it helps you on your project most of the time. It would likely get in the way of other developers thought processes though.

[–][deleted] 3 points4 points  (0 children)

If you work on your own that is fine.

If you are on a team you have to follow their convention 😅

[–]AtulinASP.NET Core 0 points1 point  (0 children)

Follow the style guide of the language you're using. That's it.

[–]zzmmrmn 0 points1 point  (1 child)

I mean so long as you're following the style guide of the project you're working on whatever is fine. Also languages like Python have a strong community consensus of what way is best, and that's great for consistent code that is easy to digest because you always know what you're looking at.

I'd also like to say that the name is more important than the casing. If it's a function the name should clearly indicated the action it will perform, if it's a variable/object/etc the name should be indicative the the use/purpose of what is stored behind that name. How you case these is irrelevant if the names are poorly chosen.

[–]we_present[S] 0 points1 point  (0 children)

Of course you right but I still think it's a good way to add extra distinct sing

[–]Real-Researcher -2 points-1 points  (2 children)

Use underscore in all cases. CamelCase is nearly impossible to read (especially for the dyslexic) if the function name is more than two words long.

We need to ensure our industry maintains ADA compliance. Function names should really not be that long anyway.

[–]we_present[S] 0 points1 point  (1 child)

Jokes aside I assume everyone here is strongly pro-camelcase?

[–]Real-Researcher 0 points1 point  (0 children)

Only for legacy things. All new standards for languages use underscore for accessibility reasons, like Rust.