Hacker Newsnew | past | comments | ask | show | jobs | submit | werdnapk's commentslogin

I saw many billboard ads on Portugal (Europe) highways. As a Canadian, it seemed like a lot.

I used to live and breath C++ early 2000s, but haven't touched it since. I can't make sense of modern C++.

> I can't make sense of modern C++

A lot of it is about making metaprogramming a lot easier to write and to read.

No more enable_if kludges since if constexpr (and concepts for specific stuff); and using concepts allows to better communicate intent (e.g.: template<typename I> can become template<std::integral I> if you want the template to be used only with integer types, and so on)


Thankfully, you can still write C++ just fine without the "modern" stuff and have not only readable code, but also sane compile times. The notion, explicitly mentioned in the article, that all this insane verbosity also adds 5 seconds to your build for a single executor invocation is just crazy to me (it is far longer than my entire build for most projects).

I am confused. Out of curiosity WDYM by 5 seconds being far longer than your entire build for most projects? That sounds crazy low.

It's not crazy, it's just what happens if you write mostly C with some conveniences where they actually make sense instead of "modern C++". I generally write very performance sensitive code, so it's naturally fairly low on abstraction, but usually most of my projects take between one and two seconds to build (that's a complete rebuild with a unity build, I don't do incremental builds). Those that involve CUDA take a bit longer because nvcc is very slow, but I generally build kernels separately (and in parallel) with the rest of the code and just link them together at the end.

Sure, C++ is heavy for compilation, there's simply more by the compiler to do, but code repository building under 5 seconds is at the very low end of tail so making the point about someone bearing with the 5 seconds longer build time is sort of moot.

I wrote a lot of plain C and a lot of C++ (cumulatively probably close to MLoC) and I can't remember any C code that would compile in such a short time unless it was a library code or some trivial example.


You may want to watch some of Herb Sutters videos. He is one of the few sane people left in the upper echelon of C++ supporters

I'm pretty sure you mean @@ on a variable and are not common in a Ruby project. @@ is a class variable and I can see that causing all sorts of problems with data across sessions.

My niche questions are never answered correctly by AI. I'm led down false rabbit holes. Stack overflow still provides much better answers for me overall.

People wear appropriate clothing for the weather. Those temperatures are no reason to stop biking. People do not "literally" freeze when it's below 0.

Cycling or walking when it is -20C or even less does sound a little masochistic if there are alternatives available.

It gets much colder than zero. With blinding northern winds. Yes a human can do anything but is it desirable?

I really enjoy biking in Quebec city. I don't have as much experience with Montreal, but I can see how QC is a top spot.

The rovers are controlled remotely, so imagine playing a video game where your inputs lag by upwards of 40 minutes and you can't crash.


Nani Banani, Nanu Bananu, Nano Banano...


Ruby dev since 2000 and looks like refinements have been available since 2.4. I just used them for the first time this year. Definitely not a go to feature for me, but it was nice the feature was available.


80s/90s kids dealt with this with almost all their games


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: