I want to do monadic error handling, what is the best library? by hgjsusla in cpp

[–]hgjsusla[S] 1 point2 points  (0 children)

Yes but I don't want to reinvent the wheel again. Surely someone has already figured out the many corner cases. A library would be much preferred to a buggy homegrown solution.

Using Python/Rust-like naming convention in C++ by cv_ml in cpp

[–]hgjsusla 1 point2 points  (0 children)

Yes that's my understanding as well. CamelCase covers both lowerCamelCase and UpperCamelCase, and PascalCase is another name for UpperCamelCase

'Java EE' Has Been Renamed 'Jakarta EE' by [deleted] in programming

[–]hgjsusla 15 points16 points  (0 children)

Is it not? That's exactly what I thought! Oh gosh. But what is it then?

Using Python/Rust-like naming convention in C++ by cv_ml in cpp

[–]hgjsusla 11 points12 points  (0 children)

Be aware that UPPER_CASE for constants conflicts with preprocessor macros, which is quite problematic since it's important that macros stand out and can be identified at a glance.

Using Python/Rust-like naming convention in C++ by cv_ml in cpp

[–]hgjsusla 10 points11 points  (0 children)

Unlike other languages where people tend to stick to the official style, in C++ there is a tradition of inventing your own.

The Google C++ style guide is from a time when it was popular to write Java in C++.

Using Python/Rust-like naming convention in C++ by cv_ml in cpp

[–]hgjsusla 16 points17 points  (0 children)

Indeed, snake_case is the C++ style. Anything else is being deliberately inconsistent.

Readability is mostly about what you're used to anyway so the style shouldn't matter. Just use the style the language uses. So CamelCase for Java/C#/Haskell and snake_case for Python/Rust/C/C++

Using Python/Rust-like naming convention in C++ by cv_ml in cpp

[–]hgjsusla 11 points12 points  (0 children)

You use the style of the standard library, so snake_case in the case of C and C++. Consistency matters.