Meeting C++ online session with Klaus Iglberger from May 2021 Link to slides: www.dropbox.co... Some seats are available for the Training with Klaus Iglberger until End of May: meetingcpp.com...
Пікірлер: 20
@superscatboy3 жыл бұрын
It's 1am and I just found a new Klaus talk. Guess I'm going to be tired tomorrow.
@andreasfett64153 жыл бұрын
Thank's for the followup. I loved the CppChat episode. You talking about std::make_unique got me thinking. I agree, that this is not design (like RAII). But is object lifetime or ownership (or does it depend) ? Eg. is the behavior of std::unique_ptr design? Could RAII be design when we rename "scope" to "level of abstraction"? May it even be architecture in certain cases? And where can we draw the line(s)? I'm responsible for those "high level" things in my daily job, but I'm also a programmer. And I'm always struggling to where to interfere with some other programmers ideas of implementation and my responsibilities.
@MrAbrazildo3 жыл бұрын
Coding interactive apps, that can change their behavior drastically according to values in runtime variables, design patterns for me orbit around how critical hidden data can be flexible, understandable, and expandable when dealing with the rest of the project, outside their cave. Even a polished design can turn partially obsolete when the app features are expanding. So what are the best rules for that? Praise STL design is convenient if you work on scientific project, that runs always the same way, every time. In this kind of task, all you need to worry about design is how your f()s can communicate better.
@ariyowalker29683 жыл бұрын
BTW: Thank you for the pimpl lesson; I learned something new!
@ariyowalker29683 жыл бұрын
When there are unknowns in programming, the unknowns must follow the laws of logic, math, and science. With art, the mind can imagine outside the laws of logic, math, and science, but that cannot exist in reality, only as images and perceptions. Thus, there is known science, and there is the unknown science that we try to figure out when we code. Though, we cannot consider that art; it would open the door to illogical imagination. I appreciate the subject and your work... Also, I hope you found my cognitive science insight helpful. ☮️
@YouInVR3 жыл бұрын
Interesting talk.
@passerby45073 жыл бұрын
4:05 It's not true since C++17 and you should probably talk more about it.
@jakobullmann75862 жыл бұрын
Could you elaborate a little on that?
@thx9473 жыл бұрын
Is there a link to the slide? :D
@MeetingCPP3 жыл бұрын
Yes, link to slides: www.dropbox.com/s/124nqb5ul9jbsnl/Design%20Patterns%20-%20Facts%20and%20Misconceptions.pdf?dl=0
@thx9473 жыл бұрын
@@MeetingCPP Thanks! :D
@siteshsahoo88493 жыл бұрын
@@MeetingCPP Does not look like this link is valid. Can you please check ?
@vishnurudrasamudram63263 жыл бұрын
When I tried to reproduce the output I got the following errors, "wrong number of template arguments(2, should be 1)", "fn cannot be used as a function" in f, "missing template arguments before fn" in main. Could someone point me to some resources so I can understand templates. Thanks
@not_ever3 жыл бұрын
There are two Cpp con back to basics talks on template you might find useful. One is by Arthur O'Dwyer and the other by Andreas Fertig.You'll find then on youtube by searching templates back to basics
@edgeeffect3 жыл бұрын
So that the non C++ people can get something out of these talks too, it would be good if you'd have given us a quick 5-second description of what make_unique does.... I'm not sure if appealing to the non C++ people even makes any sense to you, but just sayin'.....
@scarletlettersproductions43933 жыл бұрын
Considering this talk is from a C++ conference, I doubt he's concerned with that. That said, make_unique(Args&&... args) allocates memory for the associated type and passes the given arguments to the type's constructor. (basically, it does return new T(args...);)
@EmilNicolaiePerhinschi3 жыл бұрын
the 1994 book is not "Design Patterns", it is Design Patters for OOP ... some things that work in pure OOP don't make sense when your language supports other paradigms, the way C++ does
@MrAbrazildo3 жыл бұрын
44:30, for what all of this is meant for? Does is this just to hide the f() you are currently using? Slow, large, unnecessary pointers, destructors, abstract f()s... I can't imagine myself using something like that!
@scarletlettersproductions43933 жыл бұрын
What exactly are you confused by? The point of all of this is to allow passing/storing/etc an arbitrary "thing that can be called" to/in something else. His small little "f()" function is just a contrived example so he has something to use with it. The unique pointer is used because we need to implement the abstraction with polymorphism. All of the special member functions (constructor, destructor, etc) are necessary so the "Callable" can be passed/moved/constructed. He explains everything as he goes. Its very likely that you DO use this frequently if you write C++, because what he basically implemented is "std::function"