Run-time Polymorphism in Swift

This has come up several times on the forums over the years, but I’ve never written it up in a standard place, so here it is: There are only three ways to get run-time polymorphism in Swift. Well, three and a half.

The Biggest Smallest PNG

A few days ago, my former coworker Evan Hahn posted “The world’s smallest PNG”. I was challenged to see how much data I could fit into that “smallest” PNG without actually increasing the file size. It’s more than you’d think!

CellLVM

I made a proof-of-concept LLVM-to-Excel-spreadsheet compiler. Really.

(If you don’t know what all those words mean, this probably won’t interest you.)

Older Posts

  1. 2023-12-14 Protobuf Is Almost Streamable
  2. 2023-11-26 GitMounter
  3. 2023-10-23 Type Erasure in Rust
  4. 2023-10-09 Soft Orders of Magnitude
  5. 2023-10-04 There's No Such Thing As "Implicitly Atomic"
  6. 2023-05-07 More Crosswords
  7. 2023-04-09 Two Programmer Crosswords
  8. 2023-04-01 SNaNs and QNaNs
  9. 2023-01-22 Rescuing Files From Classic Mac OS...with Swift!
  10. 2022-11-28 The Two Faces of Codable/Serde
  11. 2022-10-09 Swift was always going to be part of the OS
  12. 2022-05-14 Relative References in ARM64 Disassembly
  13. 2022-04-24 Default Arguments and Label-based Overloading
  14. 2022-02-21 Dynamic Linking Is Bad For Apps And Static Linking Is Also Bad For Apps
  15. 2021-12-31 Series: Swift Regrets
  16. 2020-08-31 Series: The Swift Runtime
  17. 2020-08-26 Objective-Rust
  18. 2020-08-21 ProcessPublisher
  19. 2020-08-05 Bitfields in Swift
  20. 2020-07-07 Suffusion: Playing with Filesystems
  21. 2020-07-03 Introducing Hermit Crab
  22. 2020-05-24 ROSE-8 on Mac OS 9
  23. 2020-04-10 An In-Game Timer for Stellaris
  24. 2020-04-03 Shallow Git Repositories
  25. 2020-04-01 Swift on Mac OS 9
  26. 2020-02-06 Flexible Identities in git
  27. 2020-02-04 Introducing the Game 'by Color
  28. 2020-01-28 ROSE-8: Console Mode
  29. 2020-01-22 Setting up gitweb on Shared Hosting
  30. 2020-01-13 ROSE-8
  31. 2019-08-01 > go east
  32. 2019-04-01 Source Is View
  33. 2019-02-07 ABI Stability and More
  34. 2018-03-31 Adventurer
  35. 2017-03-15 "Buffer Overflows" (a rap battle)
  36. 2017-03-03 What's the Longest Kanji?
  37. 2016-03-31 "Animated" Sorting Algorithms (in Swift)
  38. 2016-03-17 Anagram Descrambler (in Swift!)
  39. 2015-09-20 Unending
  40. 2015-09-13 Jack be nimble, Jack be Swift (TM)
  41. 2015-09-05 qa and the developers tears
  42. 2015-03-19 zsh Seuss
  43. 2014-10-12 "Shellshock"
  44. 2014-09-15 Sweet Swift Sleep
  45. 2014-07-04 "Heartbleeder"
  46. 2014-03-31 A State Machine Simulator
  47. 2014-03-30 NaCreSoMo "CubeQuest" & Pompeii/Daughter
  48. 2014-03-27 What is a Parser?
  49. 2014-03-14 "goto fail"
  50. 2014-03-05 What is a Lexer?
  51. 2013-09-29 The Ballad of Joe Programmer
  52. 2013-09-09 expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
  53. 2013-03-29 TEXT ADVENTURE LOL
  54. 2012-06-15 Cocoa Geek
  55. 2010-12-29 A Perfectly Indented Sea

Possibly Related Tags