Skip to content
0:00 / 0:00

#stl#algorithms#seanparent

C++ Seasoning

aghuttun

4.2K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2018 to 2022.
  • Presented by Sean Parent
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

58K views13 years ago3 recommendations

Programming languagesSoftware designC++Design patternsPerformance and optimization

Sean Parent demonstrates how to write cleaner, more correct C++ by utilizing standard library algorithms instead of writing raw loops.

Day 1 - A look at many of the new features in C++ and a couple of old features you may not have known about. With the goal of correctness in mind, we'll see how to utilize these features to create simple, clear, and beautiful code. Just a little pinch can really spice things up.

Why it's here

3 people recommend this

What people say. Widely recommended as a must-watch talk for learning the STL mindset and improving C++ code quality by eliminating raw loops.

Sunchoon Hacker News • Recommends

On “Ask HN: What is the best Modern C++ MOOC?”

…ou're just looking for a straight intro to C++ course this isn't it. But it's a ton of fun and the generic programming/STL mindset is very powerful. Programming Conversations is another great lecture series by Alexander Stepanov: link I would also recommend searching YouTube for videos by Sean Parent. This one in particular is very enlightening: link to this video Sean Parent is very good at getting you in the STL mindset and showing off the expressive power of using the standard STL algorithms in your code. Except in the simplest cases, you should try to use them instead of writing your own loops. Here are some random tips if you're coming from C or Java: "new" is not the way to create objects in C+…

matthewaveryusaon Hacker News • Recommends

On “Loopless Code (2006)”

Sean Parent has a good talk about no loops in C++. His primary argument is that typically a loop is an algorithm you’re applying (map, filter, reduce…) and the raw loop masks the algorithm. link to this video

einpoklumon Hacker News • Recommends

On “Show HN: State-of-the-art German speech recognition in 284 lines of C++”

It was a cute gimmick for the title, nm. But you should try to avoid raw loops in favor of established iteration patterns / standard library algorithms. I found this talk on the subject by Sean Parent to be educational: link to this video