On Jun 21, 2015, at 03:24 , Stephane Sudre <dev.iceb...@gmail.com> wrote:
> 
> Maybe I misinterpreted the presentations, but this is not a property
> of the language (i.e. Swift 2), it's the IDE that does this. Which
> means that would you edit Swift code in TextWrangler, you would still
> only have the verbose source file.

You are correct. One way of mitigating this would be to routinely create a 
protocol containing the public API.

However, an explicit rendering of the API brings back the problem we wanted to 
get rid of: having to type (and edit) the class definitions twice. Also, I’m 
not sure what happens when you’re using classes in a framework, because there 
isn’t a Swift file to open, protocol or not — AFAIK the framework’s public API 
is in the module file, and not in textual header files like Obj-C.

Perhaps the real answer is that code-editing text editors, to be useful for 
Swift, will need to become aware of the need to show generated interfaces (just 
like they’ve become aware of the need for syntax coloring according to 
language), and add the ability to show the generated interface to their feature 
set. With the open-sourcing of Swift, it should be possible for editors to 
acquire the syntax analysis as a library, which at least makes the idea 
feasible.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to