Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
WORLDS BEST BABY
Aug 26, 2006

lord funk posted:

Yeah me too.

Same. While we're on the topic of playground bugs… are you supposed to be able to import UIKit into playgrounds? I've tried 'import UIKit' in all the configurations I could think of, including in an iOS project — but every time I just get "No such module 'UIKit'".

Adbot
ADBOT LOVES YOU

WORLDS BEST BABY
Aug 26, 2006

Doctor w-rw-rw- posted:

Playgrounds, for now, seem to be OS X only, without the simulator environment, so if that's intended it doesn't seem to be supported, currently.

Thanks, that seems to be it.

WORLDS BEST BABY
Aug 26, 2006

Doctor w-rw-rw- posted:

Nevermind. I think that Xcode might have a right-sidebar option for iOS playgrounds.

Oh hey, they hid that well! Unfortunately, after selecting iOS in the platform dropdown all I get is "Error running playground. Cannot find suitable target device". :sigh: Thanks anyway.

Edit: Got it. For whatever reason playgrounds require at least one device profile to be added in iOS Simulator, and I didn't have any.

WORLDS BEST BABY fucked around with this message at 20:38 on Jun 4, 2014

WORLDS BEST BABY
Aug 26, 2006

I wanted to see how feasible it was to use Swift in an app I'm working on, so I rewrote a small set of classes and put it up on Github: https://github.com/sgwilym/TableViewIconIndex I'm not a brilliant programmer by any means, but I'd like to use Swift as an opportunity to improve my code — any un-Swiftlike you smart folks can spot in there?

Like a few of the other posters it took a little bit of wrangling to get the Swift compiler to cooperate, as the way Xcode builds the ProductName-Swift.h header file isn't very transparent and requires a little massaging (for one class, I found the only way to get the header file to compile was to change one Character property to the String type). Pretty satisfying to see it working among all the Obj-C classes in the simulator.

WORLDS BEST BABY
Aug 26, 2006

Toady posted:

John Gruber seemed interested in linking every article he could find this week. Wil Shipley is treating it as an overreaction.

The worst bit of this is that John Gruber’s influence is so outsized compared to most of the people he's linking to, and that he's basing the merits of dynamism in Swift on who is arguing for it — namely his friends.

Not that I'm worried anyone working on a successor to UIKit is taking notes from Daring Fireball, thank christ.

Yesterday Brent Simmons posted about how Elm (a ML language primarily designed for writing UIs) handles this case, and he doesn't like it because switch statements.

Personally, I really like the way Elm (and its intellectual offshoots like Redux) handles inputs, and think it's a great fit for a static, funcitonal setting. I don't find the argument that it's too much boilerplate particularly convincing, and it's weird to read all these Objective-C programmers who are apparently very squeamish in the face of verbosity.

  • Locked thread