C++ Reflection Is Not Contemplation - Andrei Alexandrescu - CppCon 2024

  Рет қаралды 14,226

CppCon

CppCon

Күн бұрын

Пікірлер: 24
@tomkirbygreen
@tomkirbygreen Ай бұрын
Pure magic. Fantastic presentation, thank you Andrei.
@Roibarkan
@Roibarkan Ай бұрын
10:01 Herb Sutter’s talk: kzbin.info/www/bejne/fH_MYmCuadWioNU (with Alexandrescu cameo)
@JohnDlugosz
@JohnDlugosz Ай бұрын
37:00 Re: Hobbs The ship that Theseus kept swapping parts out of retains its original VIN (Vehicle Identification Number) and is legally Theseus's ship. The one that Hobbs assembled from salvage needs to be registered at the DWPV (Department of Wind-Powered Vehicles) and get a new VIN. To be period-correct, Hobbs would need to obtain a new ΣΠ (Σήμα Πλοίου) at the ΤΠΠΟ (Τμήμα Πλοίων Πνεύματος Όλμων). The definition of "same ship" vs "new ship" is both well-defined and ancient. To show that this is ultimately a matter of definition, consider Microsoft's licensing of Windows. If you swap out one part, like the hard drive, it's recognized as the same PC. But if you swap out three parts-or the wrong part-your license verification might fail, treating it as a new *PC*. (That's my personal experience-Microsoft's exact rules are undocumented and likely change over time.) You used to be able to call Microsoft and explain, "I just got a new hard drive," and they’d restore your license. This shows that there’s no objectively well-defined answer-it’s whatever the bureaucrats (or tech support) have on file. Ultimately, it’s less about an objective set of rules and more about the authority defining that specific case.
@matrixstuff3512
@matrixstuff3512 Ай бұрын
Andrei has got to me one of my favorite speakers of any topic
@stratula1
@stratula1 Ай бұрын
Great speech. Thanks for sharing!
@ethanevans8909
@ethanevans8909 Ай бұрын
Andrei talks are always so fun
@dexterman6361
@dexterman6361 Ай бұрын
This talk was great! I was playing around with reflection and when I realized that I couldn't craft functions for the type I was constructing, it felt weird. But I guess something is better than nothing, as C++ is perhaps 26 years too late to the party, any later would be bad.
@mishadjukic8904
@mishadjukic8904 Ай бұрын
Very useful talk. The point with identity - the disassembly and reassembly - is powerful indeed. Two comments: - Another version of “Ship of Theseus”: kzbin.info/www/bejne/gnLLaXuorruUm7s - On slide 6, the order of arguments of “property” does not match the order of parameters on slide 14 (where definition of “property” is given).
@bawbe
@bawbe Ай бұрын
gonna be that nerd, pretty sure it's not future subjunctive... I believe it's future perfect... :D @ 8:55
@nicolasbertrand3932
@nicolasbertrand3932 Ай бұрын
got me thinking.. there is future subjunctive in ..english? how that guy was so sure ...
@japedr
@japedr Ай бұрын
queue_injection? Why not code_injection instead?
@JohnDlugosz
@JohnDlugosz Ай бұрын
Because it's not injected into the `property` function in-place. It goes back where the head of the source parsing is.
@jhk578
@jhk578 Ай бұрын
I like to use reflection but there is something I’m worrying about. Debuggability, I wonder when would we get this thing in a debuggable manner. 2030 seems high expectation😢
@JohnDlugosz
@JohnDlugosz Ай бұрын
I think the practicality of generation based on token sequences and constexpr functions can be well-informed by the LISP folks, who use this model, and have used it for decades. Common Lisp predates C++. Scheme is even older.
@driedurchin
@driedurchin Ай бұрын
This looks a lot like Rust's procedural macros from a usability standpoint, is `queue_injection` fundamentally different from `quote!`?
@minefun0rus
@minefun0rus Ай бұрын
11:53 Let's be honest, we don't need setters/getters here at all: ``` struct Book { std::string author; std::string title; }; ```
@JohnDlugosz
@JohnDlugosz Ай бұрын
Yes, he covered that immediately after; explaining it's a toy example.
@finallyfedupwithpeople
@finallyfedupwithpeople Ай бұрын
It's a shame that Circle didn't make it into C++
@alskidan
@alskidan Ай бұрын
L-word 😅
@sunipmukherjee2130
@sunipmukherjee2130 Ай бұрын
The amount of time we are spending basically turning C++ into Rust amazed me. The moment backwards compatibility is invoked, all of the safety guarantees of these advancements are thrown out. A sad fact this large community doesn’t seem to want to acknowledge.
@riley-arr-g
@riley-arr-g Ай бұрын
Cpp is a mess. Totally and utterly unsuitable for all but the most elite.
@mrtfttkhv
@mrtfttkhv Ай бұрын
I really like the feature, but I really don't like how rust is not being mentioned, while it was surely a main example...
@testtest-qm7cj
@testtest-qm7cj Ай бұрын
Maybe because reflection was invented & popularized by other people many years prior to the birth of Rust programming lauguage?
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Bjarne Stroustrup - The Essence of C++
52:46
code::dive conference
Рет қаралды 4,2 М.
C++ Weekly - Ep 460 - Why is GCC Better Than Clang?
17:31
C++ Weekly With Jason Turner
Рет қаралды 23 М.
Andrei Alexandrescu: Sheer Folly
1:07:43
nineteen raccoons
Рет қаралды 429
Rant: Entity systems and the Rust borrow checker ... or something.
1:01:51