What exactly is an object?
What exactly is an object?
Posted Feb 25, 2025 10:11 UTC (Tue) by Sesse (subscriber, #53779)In reply to: What exactly is an object? by tialaramex
Parent article: Slabs, sheaves, and barns
Of course, adding _data members_ to another class from the outside would be nearly impossible in C++'s compilation model (which it, of course, inherited from C).
Posted Feb 25, 2025 20:09 UTC (Tue)
by tialaramex (subscriber, #21167)
[Link] (1 responses)
C++ ADL which maybe you were also gesturing at is just a mess. Your whatever function is indeed treated by C++ as if it's "part of Foo's interface" but only when it was defined in the same namespace so that ADL will find whatever when it is looking up Foo. This causes weird hard to understand issues in real world C++ software because what foo(bar) means will depend on the context in which you wrote it in non-obvious ways, as a result "turning off ADL" via arcane tricks is often needed & there have been attempts to reform ADL or to add explicit "No ADL please" features to the language.
I was serious about that docbug, who do I raise this with? I'd rather raise it as a bug rather than sending a patch because I'm certain those answering the bug ticket will know more than I do about kmalloc
Posted Feb 27, 2025 9:28 UTC (Thu)
by aviallon (subscriber, #157205)
[Link]
What exactly is an object?
What exactly is an object?
