Typo in Blog article about reflection?


(Thomas Krajacic) #1

Not sure if this is the right place (blog posts are not on GitHub right?) but there is a typo in the latest blog post which may be a bit confusing to readers:

…so a layer of C++ connects the two…

Shouldn't that be

so a layer of C connects the two

?
/cc @Mike_Ash


(Ted Kremenek) #2

Fixed, thanks!


#3

I thought the same thing at first, but when I read the next paragraph I changed my mind. Doesn't the next paragraph say that the connecting layer is C++, but with a C function name and Swift-compatible parameter passing? Or is that function not the connectivity layer?


(Thomas Krajacic) #4

Haha, I experienced the exact same thing and even changed the voice of my post from

"This is clearly a mistake" to "Isn't this a mistake?" :joy:

But then again the sentence

…accessing those C++ classes directly from Swift isn’t possible, so a layer of C++ connects the two.

really made no sense to me.

As the C++ in this layer is extern C it basically is C I'd say.

But yeah, I agree with you – it's not clear to me either if you'd consider the C++ function in a C layer when you annotate it that way or if you would still call it a C++ layer. :man_shrugging:


(Dave DeLong) #5

I thought it might be referring to a "a layer of Objective-C++ connects the two", because the next lines talk about a .mm file.