Hacker News new | ask | show | jobs
by ninkendo 970 days ago
> never once heard a Swift developer complain that it's too hard to discover API interface

Xcode presents the equivalent of a “header” when you follow a symbol to a framework you don’t have the source for… it’s a swift file full of definitions only and no implementations. The compiler emits this for you automatically as a .swiftinterface file

> or keep things non-`public`

I definitely am a swift developer that would complain about this. It’s way too easy to be cavalier about using the “public” keyword and making things part of the public API when they probably shouldn’t be. It’s like engineers have muscle memory from Java and just type “public class” without really questioning why first.

1 comments

> The compiler emits this for you automatically as a .swiftinterface file

It's so incredibly slow, though, which is frustrating. It would be ok if only this were as instantaneous as checking a header file.

Ironically, almost everything about "Swift" is slower than Objective-C.