News for hackers. Stuff that matters.
Re:CamelCase vs. Underscores: Revisited by jjice on Wednesday January 25, 2023 @06:35PM (#34525734)
Whatever the standard is for the language. Unless we're in a language without a standard (cough cough PHP cough cough). I work in a real snakecase mixed with camelcase PHP codebase at seemingly random intervals. Worst part is that this codebase started only a few years ago.

Snake is my preferred. The Python/Rust use of snake case and Pascal case for their respective purposes is my favorite.

Re:CamelCase vs. Underscores: Revisited by doutunlined on Wednesday January 25, 2023 @06:50PM (#34525872)
No linter? Seems like a quick thing to standardize
Re:CamelCase vs. Underscores: Revisited by jjice on Thursday January 26, 2023 @10:13AM (#34532609)
I actually did set up our linter but can't enforce the casing since so much of the codebase is all over the place and leadership didn't want to take any risk with an automatic conversion :shrug:.
Re:CamelCase vs. Underscores: Revisited by tredre3 on Wednesday January 25, 2023 @06:56PM (#34525946)
> Unless we're in a language without a standard (cough cough PHP cough cough)

Frameworks, IDEs, and linters all follow the PSR-2: https://www.php-fig.org/psr/psr-2/ .

It is indeed common for new developers to not know or care about it, but most professional shops I've been to adhere to it unless they're working on very legacy code.

Re:CamelCase vs. Underscores: Revisited by jjice on Thursday January 26, 2023 @10:17AM (#34532674)
Huh, thanks for the link. I swear that when I read that document (or a similar PSR) about a year ago, it specified that it didn't take a stance for method names (or maybe regular function names). I wonder why I thought that or if I read it someone else.

Thanks for that.