Comment by pjmlp
1 day ago
Yes, C++ can be made as nice as C#, Kotlin and such.
That is what made me appreciate it with modern frameworks like OWL and Turbo Vision back in the day.
Unfortunately too many folks insist in C style coding, which kills ergonomics like those.
Additionally now at C++20 [0], there are plenty of improvements for Python like coding.
[0] - C++23 is pretty much WIP
> Python like coding
Please noooooooooo! I don't want to have to watch out how many indentations I've made, just for making sure I don't get any weird errors! (Just kidding!)
Do you have any (quick) examples what you mean with python like?
Sure, here is some C++23 code
Some forced example, combining ranges with type deduction for collection types and simplified print, for a C++ version of using itertools.
Full example at https://godbolt.org/z/5YcoM1WsY
There you will see the comments why fmt and not std, just because of current compiler support, hence why I said on my previous comment, C++20 is still the best supported one currently.
Thank you very much for these examples!
Especially ranges and views are two of my favorite features I'm looking forward to use more.