Great work man. I've been following the daily series for a week now and I really like the explanations with examples, and it's been nice revising concepts!
Best explanation with nice examples. Getting back to C++ after a while and like your video a lot. The depth, examples and the way you present it are all nice. Thanks!
In the video, the program is build in debug mode. Which disable optimisations. If the non constexpr code is built in release mode, there is a high chance that the result is calculated at compile time. I think
Hey I've been watching you for a while and I just noticed that you're now making C++ videos daily! I'm really glad that you're teaching C++ the modern way instead of starting from raw pointers in C like most people do, this is really helpful for people that are starting with C++ in the modern world using modern syntax I'm really looking forward to more advanced modern features in C++20 in the future if you plan to do them, like ranges and template parameter pack because I've been out of the C++ loop for a while now 😂
Thanks! Glad you are liking the videos. This series is nearing its end (I think I want to checkpoint this as an intro course to C++, rather than keep it going indefinitely), but I will be starting a couple more series. One catering more toward software development with C++ (where more of the niche C++ features will go, along with topics like debuggers and build systems), and another more heavily focused on parallel programming with C++. Cheers, --Nick
Great video! Was really helpful in answering some of my doubts regarding compile time and runtime. I was wondering whether you could make a video about iterators?
I have a basic video on iterators that was earlier in the series - ua-cam.com/video/-gW8amxCnrM/v-deo.html Was there something else that you wanted covered?
your way of explanation is great , thanks a lot . would you kindly explain how would the assembly look like at the last stage / what is the performance effects ?
This is another point where C++ annoys me. I get that they didn't want to reuse an old keyword and change its behavior, but they should have anyway. I don't know if it would have broken any older C++ programs that used inline lazily, but since I use g++ I don't care. I take the approach here that if it would have broken any old code then that code was likely wrong anyhow. In fact, I'd dare say that const and inline should have both been changed and constexpr is just a dumb keyword. Anyone else agree?
One of C++'s strongest points is its strong backwards compatibility. The python2 -> python3 fiasco would be huge in the C++ world due to the sheer size of code out there.
@@sledgex9 And I maintain that breaking such code would be fine because they're likely using the preexisting keyword wrong anyhow. If something is labelled const, it should be const, not some quasi-const nonsense.
@@anon_y_mousse I don't think "possibly breaking production code is fine" is a reasonable attitude to take when setting the standard for a massively popular language.
@@lemonk1230 It's not as though they haven't made production code breaking decisions before and multiple times. This would've been a positive change had they done it.
Great work man. I've been following the daily series for a week now and I really like the explanations with examples, and it's been nice revising concepts!
Thank you! Glad you have enjoyed them! :^)
Awesome explanation. Especially with showing the assembly. constexpr finally makes sense for me.
Hey nick! I have been following this series and learned so many things. Your ability to explain the concepts is amazing.
Thank you very much!
Glad you’re enjoying the videos! :^)
Best explanation with nice examples. Getting back to C++ after a while and like your video a lot. The depth, examples and the way you present it are all nice. Thanks!
In the video, the program is build in debug mode. Which disable optimisations.
If the non constexpr code is built in release mode, there is a high chance that the result is calculated at compile time.
I think
Hey I've been watching you for a while and I just noticed that you're now making C++ videos daily!
I'm really glad that you're teaching C++ the modern way instead of starting from raw pointers in C like most people do, this is really helpful for people that are starting with C++ in the modern world using modern syntax
I'm really looking forward to more advanced modern features in C++20 in the future if you plan to do them, like ranges and template parameter pack because I've been out of the C++ loop for a while now 😂
Thanks! Glad you are liking the videos. This series is nearing its end (I think I want to checkpoint this as an intro course to C++, rather than keep it going indefinitely), but I will be starting a couple more series. One catering more toward software development with C++ (where more of the niche C++ features will go, along with topics like debuggers and build systems), and another more heavily focused on parallel programming with C++.
Cheers,
--Nick
Great video! Was really helpful in answering some of my doubts regarding compile time and runtime. I was wondering whether you could make a video about iterators?
I have a basic video on iterators that was earlier in the series - ua-cam.com/video/-gW8amxCnrM/v-deo.html
Was there something else that you wanted covered?
Very nice explanation, thanks
Very clear explanation. Appreciate it!
Hi Nick, your terminal looks very nice, which one you are using? Thx!
zsh with the agnoster theme
Very clear explanation, thanks!.
your way of explanation is great , thanks a lot . would you kindly explain how would the assembly look like at the last stage / what is the performance effects ?
Thanks. It was a useful example.
Very interesting asm extractions, thank you very much
Amazing video. Thank you so much!!!
thanks for the video!
Great work! Very good explanation!
damn well explained, thanks man!
great explanation :) thanks
Thanks!
Thanks
Why can't the compiler just do the right thing without this feature? It has the same information about the code as you do to accomplish this goal.
This is another point where C++ annoys me. I get that they didn't want to reuse an old keyword and change its behavior, but they should have anyway. I don't know if it would have broken any older C++ programs that used inline lazily, but since I use g++ I don't care. I take the approach here that if it would have broken any old code then that code was likely wrong anyhow. In fact, I'd dare say that const and inline should have both been changed and constexpr is just a dumb keyword. Anyone else agree?
One of C++'s strongest points is its strong backwards compatibility. The python2 -> python3 fiasco would be huge in the C++ world due to the sheer size of code out there.
@@sledgex9 And I maintain that breaking such code would be fine because they're likely using the preexisting keyword wrong anyhow. If something is labelled const, it should be const, not some quasi-const nonsense.
@@anon_y_mousse I don't think "possibly breaking production code is fine" is a reasonable attitude to take when setting the standard for a massively popular language.
@@lemonk1230 It's not as though they haven't made production code breaking decisions before and multiple times. This would've been a positive change had they done it.