I’ve been programming in C++ for 12 years now and just learned about “friend” functions in classes. I knew about “friend” declarations naming other classes, but you can also define a “friend” function inside a class and it becomes top-level and then it sees private members? WTF
For those who are new here: I fully admit that I don’t really know Swift, C++ or Objective-C, even though I work on the compiler for #1 that’s written in #2 that is the successor of #3
Myth: Swift compiler developers are enamored with C++ and want to turn Swift into C++

Reality: Swift compiler developers don’t understand C++, except for the ones who used to work on Clang, who hate C++ having already implemented it once
You can follow @slava_pestov.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: