19
you are viewing a single comment's thread
view the rest of the comments
[-] LodeMike@lemmy.today 4 points 1 week ago

Why the fuck do people do this to themselves.

[-] DapperPenguin@programming.dev 3 points 6 days ago

From my discussion with C++ folk, auto is just part of the "modern" way of doing c++. Paired with the -> return type. Perhaps including that -> return type negates this problem? It's still strange to me. Feels more like Rust

[-] bitcrafter@programming.dev 2 points 6 days ago

One day the use of auto will grow so extensive that modern Python code will have more type annotations than modern C++ code!

[-] Lembot_0004@discuss.online 5 points 1 week ago

Do what? Use auto? As I understand that is just an alternative to templates for trivial cases.

[-] LodeMike@lemmy.today 4 points 1 week ago

Nuter one of the main reasons for headers: documentation.

[-] entwine@programming.dev 2 points 1 week ago

I think you're conflating regular auto use with using it as a return type/argument. The latter is syntactic sugar for declaring a template. It isn't any less "documented" than doing a template<class ReturnType>....

[-] LodeMike@lemmy.today 1 points 1 week ago

Having the return type name is absolutely better documented. But I guess were splitting hairs because its a hard typed language and lexers can find what it is anyway.

this post was submitted on 02 Sep 2025
19 points (100.0% liked)

C++

2101 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS