Archive for February 19, 2016

Friday, February 19, 2016 [Tweets] [Favorites]

Swift Protocols With Associated Types

Alexis Gallagher gave a great conference talk about Swift protocols with associated types, which he calls PATs. They are very weird compared with regular protocols in Swift or Objective-C, and he explains why that is and why they don’t use generic protocol syntax.

See also: An Extended Comparative Study of Language Support for Generic Programming (PDF).

Previously: Swift Protocols.

Not Too Late to Change

John Siracusa:

As you watch the churn in the Swift language and the many source-incompatible changes, remember stories like this.

Dennis Ritchie, on C:

In retrospect it would have been better to go ahead and change the precedence of & to higher than == but it seemed safer just to split & and && without moving & past an existing operator. (After all, we had several hundred kilobytes of source code, and maybe 3 installations....)

Stuart Feldman, on Make (via Kieran Healy):

Why the tab in column 1? Yacc was new, Lex was brand new. I hadn’t tried either, so I figured this would be a good excuse to learn. After getting myself snarled up with my first stab at Lex, I just did something simple with the pattern newline-tab. It worked, it stayed. And then a few weeks later I had a user population of about a dozen, most of them friends, and I didn’t want to screw up my embedded base. The rest, sadly, is history.

John Siracusa:

Languages last a long time. Even multiple years into their existence is not “too late” to change things for the better.

Update (2016-02-19): Landon Fuller:

Not much consideration given to path dependence; “the … equilibrium achieved depends partly on the process of getting there”

Simple example; unstable languages mean unstable libraries. Ecosystems and culture build up around and optimize for that problem.

Macs 10% Share of Notebook Market

Joe Rossignol:

The latest data from research firm TrendForce shows that MacBook sales continue to gain momentum in an otherwise declining notebook market. Apple passed Asus and Acer to become the fourth-largest notebook maker in 2015, reaching 10.34 percent market share compared to 9.3 percent market share in 2014. Overall notebook shipments in 2015 were 164.4 million, down 6.3 percent from 175.5 million in 2014.

HP and Lenovo continued to lead the notebook industry in 2015 with around 20% market share each, but Apple is now within striking distance of Dell for third place.