Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’d be really interested in reading a history of the codebase: from classic Mac Toolbox to whatever it looks like today. Is it still mostly C? A weird mishmash of C, C++, Obj-C, and Swift? What UI toolkit does it use?


$ otool -L BBEdit | sed 's#.*/\(.*\) (.\*#\1#'

BBEdit (architecture x86_64): libz.1.dylib libbz2.1.0.dylib Accelerate AppKit CrashReporter ApplicationServices AudioToolbox Automator Carbon CoreAudio Quartz DiskArbitration Intents IOKit QuickLook Security SystemConfiguration UserNotifications WebKit CandiedYams Titlecase UpdateKit Foundation libobjc.A.dylib libc++.1.dylib libSystem.B.dylib CFNetwork CoreFoundation CoreGraphics CoreServices CoreText ImageIO QuartzCore

Looks like Objective-C, C++, AppKit, some other bits and pieces. QuartzCore has Core Animation in it which can either be used to create flashy animations or be used to create some very solid, high-performance text views (if that’s how you use it).


I believe it's still mostly C, and it definitely uses some custom text field stuff. If it were using the Cocoa textfield it would have smooth scrolling, but BBEdit still retains line-by-line scrolling.


BBEdit can (and always could) read text files significantly larger than RAM without thrashing VM. This has always required a custom text engine, first because it was the only way to do that, and more recently I assume it still provides highest performance.


When it started, the native text editing on the Mac was limited to 32K chunks! Need anything more, you could start with the raw APIs that lay out a single line of text and do it by hand.


I’d say Carbon but it wouldn’t work on macOS >= Catalina if it were true.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: