Adding "Swift" to the mangled name is reasonable. The class is not ordinarily visible, so most of the time that people see it will be in potentially mangled contexts like crash logs.
I'm reluctant to put too much ObjC into the name, because this is the base class for classes that are *not* @objc. > On Jan 6, 2018, at 7:21 PM, Saagar Jha <saa...@saagarjha.com> wrote: > > Just my 2¢, from the point of view of someone runs into SwiftObject > frequently: I’d really appreciate it if this class had “Swift” in it’s name. > At first glance, it’s name in mangled form (“_TtCs7_Object”) gives no > indication as to where it’s from. Obviously it’s not a “pure” Objective-C > object, but it’s not clear that it’s a Swift object either–maybe it’s C++? > Saagar’s cool new language that also does name mangling? Who knows. I guess > “_T” is kind of enough to figure it out, but since you’re changing the name > anyways it would be great if it was something that reduced my cognitive > overload, like Swift._SwiftObject. > > If you’re going to expose this to Swift as well, a similar argument applies: > from it’s name, it’s not clear that it’s part of Objective-C interop. I’m not > sure if this is visible to Swift programmers, and if it isn’t this isn’t an > issue, but in the case that it is Swift._Object looks more like a private > implementation detail of a base class akin to NSObject in Objective-C or > Object in Java than a compatibility shim with Objective-C. > > Saagar Jha > >> On Jan 4, 2018, at 19:10, Greg Parker via swift-evolution >> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote: >> >> SwiftObject is an Objective-C class that is the base class of all "pure >> Swift" class types. It needs to be renamed for the Swift stable ABI in order >> to avoid ObjC class name collisions between the stable ABI's Swift runtime >> and the runtime embedded into existing Swift apps. >> >> I suggest `Swift._Object`, mangled as _TtCs7_Object like other Swift ObjC >> class names. >> >> Any comments? >> >> https://github.com/apple/swift/pull/13748 >> <https://github.com/apple/swift/pull/13748> >> >> >> -- >> Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime >> Wrangler >> >> >> _______________________________________________ >> swift-evolution mailing list >> swift-evolution@swift.org <mailto:swift-evolution@swift.org> >> https://lists.swift.org/mailman/listinfo/swift-evolution >
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution