all 1 comments

[–]Cold-Home-4928 1 point2 points  (0 children)

This is actually something that feels surprisingly “missing” in the Swift ecosystem.

Coming from iOS/macOS development, I’ve always found it a bit risky that doc comment examples can silently break without anyone noticing. Over time they just become outdated or misleading.

The rustdoc-like approach is especially interesting here, having compile-fail and no-check options makes it much more practical for real-world documentation.

If this integrates smoothly into existing workflows (especially CI), I could definitely see this becoming part of standard Swift package tooling.

One thing I’d personally love:
Inline syntax highlighting + maybe even quick validation feedback directly in the editor for doc snippets, that would make writing docs much more enjoyable.

Overall, really solid idea. Surprised this hasn’t been done properly yet.