| ▲ | bayindirh 7 hours ago |
| Personally I don't find programming with C++ that hard. The downside is it needs a brain warm-up, and this is per project, but once that flywheel is spinning, I find it almost effortless to write code. I have to go through the same warm-up more or less for any language I work with, so it's not that different than writing Python, Go or Java for me. |
|
| ▲ | whstl 5 hours ago | parent | next [-] |
| I find C++ not hard at all when working with familiar idioms, restrictions and toolings (familiar to me). But it's hard jumping into new codebases and adjusting yourself to new patterns. Recently I did a lot of programming using C++23 Modules and it was a breeze. There's basically dozens of very nice languages inside C++. That can be a blessing or a curse. I'm anxious for Herb Sutter's CPP2/CPPFront to become a standard. |
| |
| ▲ | domenicd 5 hours ago | parent | next [-] | | What type of project actually uses C++ 23 modules in real life? What kind of toolchain enables that? When I worked on Chromium, they were indefinitely in the "maybe in 5-10 years the tooling will be ready" camp. | | |
| ▲ | bluGill 3 hours ago | parent | next [-] | | The tooling people have - as of about a year ago said they are ready. Now everyone who considers themselves early adopters is using then. Most are waiting for the early adopters to figure out what the best practices are so we don't make a mess | | |
| ▲ | maccard 21 minutes ago | parent [-] | | What early adopters are using them? Because my impression is the tooling still isn’t there |
| |
| ▲ | whstl 4 hours ago | parent | prev [-] | | YC startup. Toolchain was Clang and sh. Chromium is gonna be more conservative than that for sure. |
| |
| ▲ | tialaramex 5 hours ago | parent | prev | next [-] | | In February this year Herb tweaked a test case. That was his last commit to his "CPP2 syntax experiment". Don't expect it to "become a standard". https://github.com/hsutter/cppfront/commits/main/ | | |
| ▲ | whstl 4 hours ago | parent [-] | | That's a shame! It's a lovely language. | | |
| ▲ | Mond_ 31 minutes ago | parent [-] | | Is it really, though, or is it just in comparison to C++? Tbh I never expected that experiment to go anywhere. I guess that leaves Carbon (and large scale efforts to rewrite C++ in Rust). | | |
| ▲ | whstl 12 minutes ago | parent [-] | | I personally really like the syntax and the defaults, and I like it more than the C++ alternatives. |
|
|
| |
| ▲ | avadodin 5 hours ago | parent | prev | next [-] | | Looked up what C++23 Modules were and I must say I was not let down. | |
| ▲ | drysine 3 hours ago | parent | prev [-] | | >I'm anxious for Herb Sutter's CPP2/CPPFront to become a standard. Why? It doesn't remove complexity, it (partially) hides it and makes the whole thing even more complex. | | |
| ▲ | whstl 10 minutes ago | parent [-] | | I enjoy the syntax and the defaults he picked, and it matches the way I use C++. I prefer it to all the C/C++ alternatives. |
|
|
|
| ▲ | rustyhancock 5 hours ago | parent | prev | next [-] |
| I agree. You don't learn or know C++ in the way you learn or know C. You never have the total language spec in mind. Much of it you will never (and for some of it should never) come across. The way I think of it C is an abstraction of the machine, so thin it's nearly transparent. C++ is an abstraction over programming paradigms, letting you pick how you think. Everything else abstracts the machine away, replacing it with a VM, runtime, or model of its own. The same way a good project has a clear model of the problem it should have a clear C++ pattern in use. |
|
| ▲ | jdw64 7 hours ago | parent | prev | next [-] |
| There are so many standards and idioms that it gets confusing. There are still legacy codebases out there — some codebase still use C++98 as their standard, others use C++11... And with Unreal Engine, the modern C++ standard is C++14, right? There are things like smart pointers, but some places don't even use them. I feel like there are just too many features. When I saw template metaprogramming — that new feature — I realized I have no talent for C++. |
| |
| ▲ | bayindirh 7 hours ago | parent | next [-] | | I have developed things with C++98, C++11 and C++14. Every of these standards are so vast, so remembering everything (even in a single standard) is not possible. Instead of knowing everything, I first fix the standard I want or need to work with. Then I design the thing I want to build. I always design what I want to build beforehand. This takes a couple of iterations from high level to low-ish level. That last design becomes a bit language dependent. Then I select some of the core tools that I'm going to use (which kind of pointers, classes or structs, etc.) With that design in mind, I go "library shopping" both for file formats (if any) or other stuff like vectors, etc. Armed with the reference docs of these, I write my code with the toolbelt I have built for the project. Some things are hard, but they are not impossible. I find thinking like compiler helps a lot. | |
| ▲ | flohofwoe 6 hours ago | parent | prev | next [-] | | > When I saw template metaprogramming — that new feature — I realized I have no talent for C++. It's not a new feature. And tbh, compared to Typescript, C++ templates are tame ;) (but yeah, deciding when to stop digging into the template metaprogramming rabbit hole requires some common sense and sanity, too much template complexity is almost never worth the hassle) | | |
| ▲ | bregma 2 hours ago | parent [-] | | It was a new feature. Over 30 years ago now. Template metaprogramming was even featured in the ARM. |
| |
| ▲ | justin66 2 hours ago | parent | prev | next [-] | | > And with Unreal Engine, the modern C++ standard is C++14, right? Unreal Engine depends on C++20 at this point. https://dev.epicgames.com/documentation/unreal-engine/epic-c... | |
| ▲ | maccard 6 hours ago | parent | prev [-] | | This is true of any language. Python with flask vs django, with/without type hints. JavaScript with anhular and vue. The varying standards are no different to major python versions or go versions - arguably there’s even less between most versions than there is in your average go release. The differences in apps and frameworks don’t matter for day to day - std::string, Unreal’s FString and QT’s QString all are similar enough that 99.9% of the time. Metaprogramming is one of those things; you either write it or you don’t. Knowing some basics is required but the vast majority of people use a handful of pre existing things without understanding the nuances of how it works under the hood. |
|
|
| ▲ | lelanthran 6 hours ago | parent | prev [-] |
| > The downside is it needs a brain warm-up, and this is per project, but once that flywheel is spinning, I find it almost effortless to write code. How is that different from other languages, which don't need the brain warm-up? |
| |
| ▲ | bayindirh 6 hours ago | parent [-] | | The difference, if you split hairs, that the brain warm-up takes a bit longer. Maybe a couple of hours, or a day at most. Otherwise it's not different for me. I don't feel different while writing with any other language. I guess the main reason is I always think like the computer first and translate that thinking to the programming language at hand. |
|