mikeash.com pyblog/friday-qa-2014-08-15-swift-name-mangling.html commentshttp://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsmikeash.com Recent CommentsFri, 29 Mar 2024 08:33:58 GMTPyRSS2Gen-1.0.0http://blogs.law.harvard.edu/tech/rssMike K - 2015-09-09 03:22:20http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsThanks for the great article. It was really helpful. <br /> <br />As you might know, the modified Punycode is just Punycode with upper-case letters instead of digits. See implementation here: <a href="https://gist.github.com/xtravar/6b52f59fb133229b360e">https://gist.github.com/xtravar/6b52f59fb133229b360e</a>3c2de20218d52ca89219ae78943852b6Wed, 09 Sep 2015 03:22:20 GMTGabriele - 2015-08-02 20:22:18http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsIn C++, when defining a function, we can use the extern "C" attribute to force the C style mangling, which makes the function callable from a C code (and maybe also change the ABI in use). Is there anything similar in Swift? Something similar to @objc but making a simple swift function callable from C? 3d912d2af8891c43b1259d09dbed8fb6Sun, 02 Aug 2015 20:22:18 GMTPaul Von Schrottky - 2015-02-04 12:58:03http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsI found a way, mangle a known class and extract the target name using regex "_TtC[0-9]+([^0-9]+)[0-9]+". Then use that to generate mangled class names for any other class at runtime.a9a640831948dc72b8dd9ec1dee28cd8Wed, 04 Feb 2015 12:58:03 GMTPaul Von Schrottky - 2015-02-03 21:05:33http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsDo you know how to use the native Punycode converter? Let's say I have a ViewController, my app name is "Acá Estoy" and I want to generate the mangled name "_TtC10Aca__Estoy14ViewController". <br />I see that the Punycoding is adding an extra underscore for the acute "á", however I don't know how to generate this programatically. <br />&nbsp;af20c275972ae5f230dcfd4ee2894d93Tue, 03 Feb 2015 21:05:33 GMTTonny - 2014-11-05 22:33:08http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsGood article. Even first several paragraphs revealed things for me that I have never thought of. Like the fact that in objective-c you cannot overload methods, since you won't explore while doing regular stuff.2f900588b7f642cf0bde8c61dee1ddf0Wed, 05 Nov 2014 22:33:08 GMTglasspusher - 2014-08-20 05:12:52http://www.mikeash.com/?page=pyblog/friday-qa-2014-08-15-swift-name-mangling.html#commentsGreat set of articles! I don't get into the guts of things as much as I used to...my code doesn't need to be blazing fast, but understanding stuff underneath never hurts. Fascinating and I enjoy following along.9bb9a34d761ad8b03b297f8b90e5269dWed, 20 Aug 2014 05:12:52 GMT