Live data from Hacker News

9 years of Apple text editor solo dev

papereditor.app

231–240 of 405 posts

Re: 9 years of Apple text editor solo dev

#231
post #229

Earlier quoted context omitted.

Thanks! Indeed, there is TipKit. I've just learned about it a few days ago. I think so far when Apple added new features to existing components, they've always made dual APIs. Only some completely new things are Swift-exclusive. That said, as the pile of those exclusive things gets bigger, it would be harder and harder to stay in Objective-C.

You know you don't have to choose one or the other, right? The languages interoperate and there's really no overhead to adopting Swift anymore. On newer OSes you're using tons of Swift under the hood anyway.

I have not investigated it, to be honest. If it's as easy as switching the compiler to Swift, and everything remains working as is, but I also get to use all the Swift stuff in addition to Objective-C, then I am clearly missing out!

Re: 9 years of Apple text editor solo dev

#232
post #65

Earlier quoted context omitted.

Be real: Apple is not going to rewrite MacOs/iOs in Swift. Objective-C will always be there, offering faster and more robust features. Just look at the Microsoft equivalent: yes, C# is good and all, but the hardcore Windows apps are still using (lightly-skinned) VC++ APIs - after almost 25 years since they started flogging .NET. Swift is for the new rubes, bootcamp graduates and so on.

One of the most complex apps that Microsoft produces is Visual Studio. It is currently a hybrid of C++ and C#. I suppose that almost all new features are written in C# where possible. Why won't Apply follow the same path? The developer productivity in Swift must be 10x compared to Objective C. To be clear: I write this post as someone who has infinite love for optimization of native code. However, in many situtations…

Apple does use Swift in their IDE, Xcode. Several years ago they rewrote the text editor component in Swift. It’s taken them a while to get all the features back that the old one had, and has had a fair amount of bugs as well. I often wonder why they didn’t just leave it in ObjC and add the new features they wanted to add, like the minimap or sticky declaration heaters.

I definitely wouldn’t call Swift a 10x improvement in efficiency, and I like coding in Swift. I do advent of code in it each year, but spend a fair amount of time just fighting with the compiler–after all these years, it still emits strange or just flat out incorrect diagnostics.

Re: 9 years of Apple text editor solo dev

#233
post #202

I cannot have read that correct. For people on the Apple Dev ecosystem, do you really have no access to SDK code as a reference? Not even some high level abstraction version? I got to that assembly code part and just sat there and re-read it again and again. "You've got to go straight to assembly mode?" I cannot have read that correct.

I recently have been building in Swift and indeed this seems to be the case. It's endlessly frustrating. Also privatizing variables seems to be quite aggressive in standard libraries and I often find myself wanting to use that internal stuff.

Re: 9 years of Apple text editor solo dev

#234
Are you working in TextKit 2 or TextKit 1?

What is your flow for accommodating new OS changes (some being quite dramatic)? Do you make list of broken things and new opportunities, then devise a complete solution? Or do you address them incrementally?

Great write up. Thank you.

Re: 9 years of Apple text editor solo dev

#235

Are you working in TextKit 2 or TextKit 1? What is your flow for accommodating new OS changes (some being quite dramatic)? Do you make list of broken things and new opportunities, then devise a complete solution? Or do you address them incrementally? Great write up. Thank you.

Thanks!

Still on TextKit 1. I am thinking of migrating to 2, but I still have downloads on older Macs, so I want to wait. Supporting both 1 and 2 in parallel would be a nightmare.

To be honest, I have not experienced a lot of dramatic updates. Apple has a good track record of keeping things backward compatible. The issues that I find on the new betas, I fix before the OSes are released in the Fall.

Re: 9 years of Apple text editor solo dev

#236
post #112

> Swift has come a long way and my guess is Apple has either embedded it into their platforms or added some fancy tree shaking for the binary. It went ABI around Swift 5 or so. I took a huge leap of faith, in 2014, and started using Swift, exclusively. It's turned out OK. I'm not quite as positive about SwiftUI, though. I think it will work out, but it has a huge amount of catching up to do, if it is to replace UIKit…

I follow the development of Swiftcord, A SwiftUI Discord client, on the developer's discord, and they almost constantly lambast how much is apparently missing or unstable between AppKit and the current version of SwiftUI, which has made it a struggle to get to feature parity with the official Discord client based on Electron cause lots of things you expect either have to be implemented by hand or just can't be done I…

Why do they insist on making their life harder? Just use Cocoa...

Re: 9 years of Apple text editor solo dev

#238
post #202

I cannot have read that correct. For people on the Apple Dev ecosystem, do you really have no access to SDK code as a reference? Not even some high level abstraction version? I got to that assembly code part and just sat there and re-read it again and again. "You've got to go straight to assembly mode?" I cannot have read that correct.

I recently have been building in Swift and indeed this seems to be the case. It's endlessly frustrating. Also privatizing variables seems to be quite aggressive in standard libraries and I often find myself wanting to use that internal stuff.

>I often find myself wanting to use that internal stuff

And then curse Apple when the internals change and your app breaks?

Re: 9 years of Apple text editor solo dev

#239

Earlier quoted context omitted.

I recently have been building in Swift and indeed this seems to be the case. It's endlessly frustrating. Also privatizing variables seems to be quite aggressive in standard libraries and I often find myself wanting to use that internal stuff.

>I often find myself wanting to use that internal stuff And then curse Apple when the internals change and your app breaks?

I would never

Re: 9 years of Apple text editor solo dev

#240

> For instance, the NSPopover is a good candidate for bubbles that hint at stuff in the Mac app. An iOS counterpart sadly does not exist, so no bubbles in the iOS app. Ignoring popover presentations in UIKit, there’s also a new TipKit framework in iOS 17, but it’s Swift-only. https://developer.apple.com/documentation/TipKit The author has done a great job while remaining in Obj-C. I’m really curious how long they can…

[deleted]
Post reply on HN