• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Language options: Objective-C, Swift, C or C++?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Language options: Objective-C, Swift, C or C++?


  • Subject: Re: Language options: Objective-C, Swift, C or C++?
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 17 Jun 2015 08:16:48 +0000

On Jun 17, 2015, at 00:56 , Graham Cox <email@hidden> wrote:
>
> To me this is actually a good thing that I’ll be sorry to see go away in Swift.
>
> With a separate header that only contains the public stuff, I can see at a glance what a class does without being overwhelmed by its implementation details.

It’s already done in Swift 2. While you’re editing in the one pane, the Counterparts setting in the assistant pane (which in Obj-C shows the .h when you edit the .m) shows exactly this view, along with documentation (///) comments. It actually shows public and internal API within a module (basically the same thing), but I assume when used cross-module it shows only public API, but I haven’t had a chance to try that yet (though this is what Command-click on Cocoa APIs shows you, so I assume it works the same).

> It’s also untrue that you have to write *everything* twice - you have to write the method definitions twice, which is a minor bit of work.

I was being a little bit facetious. It’s minor when you’re first writing the class, but if you’re creating a lot of classes at one time (say, converting code from another language), it gets very tedious very quickly. It’s also one of the “I can’t believe the IDE doesn’t do that for you” features that newcomers to Obj-C complained about in the dev forums *a lot*.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Language options: Objective-C, Swift, C or C++?
      • From: Stephane Sudre <email@hidden>
    • Re: Language options: Objective-C, Swift, C or C++?
      • From: Ariel Feinerman <email@hidden>
References: 
 >Re: Language options: Objective-C, Swift, C or C++? (From: Roland King <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Carl Hoefs <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Graham Cox <email@hidden>)

  • Prev by Date: Scary Stuff!
  • Next by Date: Re: access modifiers in protocols
  • Previous by thread: Re: Language options: Objective-C, Swift, C or C++?
  • Next by thread: Re: Language options: Objective-C, Swift, C or C++?
  • Index(es):
    • Date
    • Thread