Hacker News new | past | comments | ask | show | jobs | submit login
Swift API Design Guidelines (swift.org)
74 points by rayshan on Jan 30, 2016 | hide | past | favorite | 3 comments



It's really clever how they have an official variation of Markdown as the official comment documentation format.


To help with documentation, install VVDocumenter: https://github.com/onevcat/VVDocumenter-Xcode

I've changed my trigger from "///" to "////" so that I can write "///" comments manually if I want to.

-----

Some things I might add:

- If possible, use a protocol as the base for all functionality. Generally, this is named "FooType".

- If you provide a "FooType", provide a type-erased "AnyFoo" as well.


This website renders pretty crappy on an iPad.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: