Hacker News new | ask | show | jobs
by newaccount74 1535 days ago
Your answer is correct. Swift & AppKit is what you should use for a native macOS app today.

Only one thing to add: Embrace the fact that Swift and Objective C are compatible! Some parts are way easier to write in Objective C, eg. anything that interfaces with C code.

Also, if your app does non-trivial amounts of text editing, those parts should probably be written in Objective C.

Working with NSTextView / NSString / NSMutableString / NSAttributedString in Swift is difficult. You always need to be super careful not to mix up Objective C characters (UTF-16) with Swift characters ("Grapheme clusters"). Even as someone who read a lot about those topics it's easy to mix them up. It's also easy to run into catastrophic performance problems, eg. checking large strings for equality is really slow in Swift, and can easily lead to UI hangs.