I feel the wrong patterns were picked. singleton is borderline an anti-pattern. adapter is simple, and iterator is built-in
@jhbonarius3 жыл бұрын
Singleton: The window size values were constexpr... he just casually removes it, preventing compile time substitution. Why not put the global values into a separate namespace if you're worried about symbol collision? Adapter: he's just modifying the data of some object. That's not the adapter pattern. Iterator: why is he getting the window size over and over in the inner loop?
@njussakka3 жыл бұрын
Exactly my thoughts when I was watching this. How this got to CppCon in the first place?
@helen13angel9 ай бұрын
It's a very good talk! Very clean and the presentation is very well organized for this amount of time. People who criticize should read the title: it's back to basic, that's why it's not covering all the things they wanted to talk about.
@jamessilva83313 жыл бұрын
Maybe this wasn't perfect (as the KZfaq comment experts below let you know), but I found this helpful
@lukaszmmaciejewski3 жыл бұрын
Planning to show three design patterns and choosing singleton as one of them seems like a very surprising choice. Especially when you don't even mention that it's widely considered to be an anti-pattern.
@antonfernando8409 Жыл бұрын
Didn't watch but listened to it while driving from Ottawa to Toronto lol. Didn't see any of those cool screen saver circles you mentioned.
@koronisneilos69833 жыл бұрын
In the adapter pattern: I whould put the code from AdapterText::AdapterText(sf::Text text) in a free function and and add some parameters like color and size to it.
@yjc149 Жыл бұрын
great presentation.. thanks!
@PedrosoJr2 жыл бұрын
Awesome! Excellent presentation.
@CppCon2 жыл бұрын
Glad you liked it!
@pengsenmao46439 ай бұрын
Since this is a 2020 talk, I believe C++17 should already be published at that time, doesn't C++11 and later guarantee that only one thread can access the object initiallsation? So singleton is thread-safe.
@gm_000 Жыл бұрын
I don't suggest this tutorial if you already have a minimal knowledge about programming. It doesn't give any good insight either on C++ or Design Pattern.
@pengdu77512 жыл бұрын
this is a mostly a tutorial introducing design patterns. look at all the big egos in the comments. if you are an expert already, go watch something else that fit your level.
@koronisneilos69833 жыл бұрын
In the singleton class m_WindowWidth and m_WindowHeight are not initialized
@minhbt27093 жыл бұрын
I just wonder why do you promote Singleton? Erich was once mentioned in favor of dropping Singleton because it is a design smell. I think, we should stay away from Singleton because it is difficult to test. Furthermore, there are many ways to solve issues without using Singleton.