Swift at Apple: Migrating the TrueType hinting interpreter

Swift adoption and “RIS” (Rewrite In Swift)

  • Commenters note Apple is rewriting many OS components in Swift across stacks (kernels on some chips, Secure Enclave, now TrueType hinting).
  • Some wish WWDC had offered deeper technical sessions on these rewrites instead of focusing on higher-level frameworks.
  • There is curiosity and uncertainty about how much of WebKit/Safari will actually move from C++ to Swift, given recent features still landing in C++.

Swift vs. Rust and language design tradeoffs

  • Debate over an alternate history where Apple picked Rust instead of Swift.
  • Points in favor of Swift: easier ergonomics, Objective‑C/C/C++ interop, stable ABI, runtime model that fits Apple’s dynamic frameworks, and more approachable ownership options (RC + copy‑on‑write vs. strict borrow checking).
  • Rust is praised for safety and ecosystem, but seen as more complex, with no standard ABI and more friction (.clone(), back references, etc.).
  • Both languages are viewed as mutually influential and converging on similar ownership ideas; Swift lifetimes/borrow-like features are still rough for some users, with reports of compiler crashes.

Licensing and open-source posture

  • The TrueType interpreter is MIT-licensed, which people find notable given Apple’s usual preference for Apache 2.
  • Explanations: patents on TrueType are likely expired, no plans for outside contributions, and MIT’s simplicity may encourage broader reuse.

AI/LLMs in development

  • Some see “LLM smells” in the code and worry about overreliance on assistants.
  • Others state that every line and even generated assembly were heavily reviewed and tested.
  • Apple is said to use external code assistants heavily; some wish they would dogfood their own Xcode agents more.

Font hinting, DPI, and macOS rendering

  • Strong disagreement over macOS’s largely unhinted text on low‑DPI displays.
  • One side argues macOS text is blurry on 1080p and that Apple ignores common resolutions; hinting would improve legibility.
  • The other side prefers faithful letter shapes over crispness, notes macOS has long done this, and argues HiDPI largely makes the issue moot.
  • Some fonts still require hinting; Apple rewrote the hinter for security rather than fully deprecating it.

Testing, fuzzing, and quality engineering

  • Commenters highlight that the project wrote ~4× more test code than interpreter code as a sign of serious quality goals.
  • Use of fuzzers to reduce a 10M‑PDF corpus to ~4,200 for coverage is discussed; the underlying set‑cover optimization is noted as non‑trivial.
  • Some feel manual rewrites of constructs like map/filter for performance signal compiler optimization gaps.

Security and hiring

  • Apple teams are actively hiring for Swift-based systems and kernel work focused on memory safety.
  • A shared resource on low-level software security is recommended for learning to reason about vulnerabilities.