• 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: OT: Swift Code Autoformatter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Swift Code Autoformatter?


  • Subject: Re: OT: Swift Code Autoformatter?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 15 Jan 2016 11:47:54 -0800

> On Jan 15, 2016, at 10:47 AM, Quincey Morris <email@hidden> wrote:
>
> — You have a utility that assists conversion from (say) Obj-C to Swift by reformatting at least the easy things according to the destination language syntax. This is the use case that the other Charles added to the discussion last night.

FYI, I wrote such a thing last year — Swiftier:	https://github.com/snej/swiftier

It’s a Ruby script that reads Objective-C source files and does a bunch of regex matching and other hacky stuff to output something that’s a lot more like Swift source code. It’s definitely not going to compile without work, unless you’re very lucky, but it’ll save you a lot of grunt work.

(Oh, I wrote this before Swift 2, so it doesn’t convert NSError** parameters into “throws” clauses or anything like that. You can use Xcode’s updater tool to do that afterwards…)

—Jens
_______________________________________________

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


References: 
 >OT: Swift Code Autoformatter? (From: Charles Jenkins <email@hidden>)
 >Re: OT: Swift Code Autoformatter? (From: sqwarqDev <email@hidden>)
 >Re: OT: Swift Code Autoformatter? (From: Charles Jenkins <email@hidden>)
 >Re: OT: Swift Code Autoformatter? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: drawRect: wrong scale in a programmatically created window
  • Next by Date: Re: drawRect: wrong scale in a programmatically created window
  • Previous by thread: Re: OT: Swift Code Autoformatter?
  • Next by thread: Re: OT: Swift Code Autoformatter?
  • Index(es):
    • Date
    • Thread