Here are some really sensible and helpful guidelines for writing an API in Swift. This is from the Swift team itself, so they’re pretty much the experts on what works.
The focus is on clarity. Guidelines include “Clarity is more important than brevity”, “Include all the words needed to avoid ambiguity”, “Omit needless words”, “Stick to the established meaning”. Most of these could practically apply to real life. 🤷🏻♂️
But this one just sounds cool: “Take extra care with unconstrained polymorphism.” 🤯 (Always a solid idea.)
Note: much of this should be seen in practice in the Swift Standard Library.