Software Dev

Swift API Design Guidelines

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.

πŸ‘‰ Swift API Design Guidelines

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.)

Image result for swift

Note: much of this should be seen in practice in the Swift Standard Library.