Archive for September 25, 2014

Thursday, September 25, 2014 [Tweets] [Favorites]

Private API and Open Source

Kevin Walzer:

It’s hard for me to get past the absurdity of Apple’s position here. It’s simply baffling why one of the largest open-source projects they sponsor--WebKit--violates platform protocols by using private API’s, and apps directly bundling such code can’t be deployed on the platform’s major distribution channel, the Mac App Store. Wouldn’t it be better for Apple to open up these private API’s, make them public, and allow third-party developers to use them if necessary? WebKit’s use of these API’s dates back to the earliest days of the project; I found commit messages from 2002 that report their inclusion. Tk would certainly benefit if use of those API’s could be made legal. If a platform vendor’s private API is used in a vendor-sponsored open-source project, how truly private is the API? If Apple is going to be consistent here, shouldn’t WebKit remove these private API calls, and find another way to render browser windows in a smooth, crisp fashion?

In a way, it does make sense. Other core OS projects that Apple has open-sourced also use private API—that probably should stay private. But I agree that it would be nice to be able to ship a customized version of WebKit. And if a Web browser needs private API to get good performance, that’s probably also a code smell.

David’s Swift Dilemma

David Owens:

The v1.0 release of Swift has come and gone, and v1.1 is right around the corner. My thoughts so far can be summed up as this: the hype of Swift is over for me - I want my ObjC 3.0 language. I’ll keep trucking along in Swift for the projects I can, but at the end of the day, I’m, on the whole, fairly disappointed in the language.

[…]

I’ve tried many different projects with Swift from algorithms to data structures to solutions for working with structured data like JSON; pretty much everything short of a full-blown app. Around every corner I’ve been met with frustration due to design limitations, bugs, performance issues, poor debugger support, and what ultimately comes down to design choices. It’s this last group that has me the most disheartened.

[…]

I don’t just dislike the concept of generics, I hate the extremism that generics forces onto your code. Once you move to generics in your code, you, by definition, give up an extreme amount of flexibility in your code base. In exchange, you are supposed to get back improvements in type safety, code reduction, and performance. What no one talks about though, is the cost to write that code, to debug that code, and to understand that code, especially as generic systems get more and more “feature rich”.

It’s a shame that the introduction of Swift means that we will probably not see much more modernization of Objective-C. I think there is a lot more that could be done there. Plus, the benefits would be available much sooner.