andrewsardone + swiftlang   36

types.markdown by Gary Bernhardt
Good straight-to-the-point write-up on types. It includes some subtle Go bashing, too :-)
swift  statictyping  swiftlang  rust  haskell  types  dynamiclanguage  golang  rust_lang 
august 2016 by andrewsardone
Add NSNotificationObserver implementation by JiriTrecak · Pull Request #21 · apple/swift-corelibs-foundation
It looks like the Swift guys don't mind using the FoundationKit rewrite as an opportunity to adjacent some of its interfaces:
in that part of this project is to help shape what Foundation looks like and acts like in swift in addition to allowing a common cross platform interface
CoreFoundation  FoundationKit  swiftlang  foundation  NSFoundation  nsnotificationcenter  open-source  swift_lang 
december 2015 by andrewsardone
Swift 2 will be Open Source - Ben Scheirman
What about Foundation?

The Swift standard library will be included, which includes things like String, Dictionary, Array, etc, but Foundation is actually Objective-C and will not be included.

This is somewhat of a disappointment, because it could be incredibly powerful to use classes like NSLinguisticTagger, NSDateComponents and NSCalendar, or other frameworks like NSURLSession and the like. Even Core Data, if that’s your kind of thing.
swiftlang  swift  open-source  wwdc2015 
june 2015 by andrewsardone
Controlling Complexity in Swift by Andy Matuschak (Video) — Realm: a mobile database that replaces Core Data & SQLite
People tell you that you’re supposed to avoid mutable state, but how can anything happen if you never call a setter? People tell you that you’re supposed to write unit tests, but how can you test a user interaction? People tell you that you’re supposed to make your code reusable, but how can you factor it out of your enormous view controllers?

Andy Matuschak is an iOS Developer at Khan Academy, and previously helped build iOS 4.1–8 on the UIKit team. In this talk, he presents a pragmatic approach to managing complexity in inherently stateful systems.
swiftlang  value_types  designpatterns  types  state  mutability 
february 2015 by andrewsardone
Optionals Case Study: valuesForKeys - Swift Blog - Apple Developer
The type system, via optionals, lets you know when an element wasn’t found, not an API.
swiftlang  optionals 
august 2014 by andrewsardone
Maps... Wait, They Don't Love You Like I Love You - Cocoaphony
A map function to go from one type of optional to another is handy:

```swift
func map<T, U>(x: T?, f: (T) -> U) -> U?
```

it shows how the `map` function is about type transformations, not limited to just collection to collection transformations.

For more formal reading, see http://en.m.wikipedia.org/wiki/Functor
functional  swiftlang  map  functionalprogramming  functor 
august 2014 by andrewsardone
MVVM, Swift and ReactiveCocoa - It's all good!
The extensions like subscribeNextAs helps work around some gross optional wrapping stuff, and I really like the RAC struct as a replacement to the RAC macro.
swiftlang  ReactiveCocoa 
july 2014 by andrewsardone
XCTestCase / XCTestExpectation / measureBlock()
Inespecially like the inner class technique for mocking.
swiftlang  testing  mocking 
july 2014 by andrewsardone
Chris Lattner on Swift’s need for both explicitly and implicitly unwrapped optionals
T? versus T!, and making sure intent can be expressed by making the ! suffix operator a proper signal of importance.
option_type  swiftlang  syntax 
june 2014 by andrewsardone
Experiment to define a generic pipe() function that evaluates from left to right.
F#'s pipe-forward operator, implemented in Swift.
What am I trying to do here? In F#, there is a "pipe-forward" operator (|>) that applies the function on its right side to the value on the left side. This makes it easy to write complex expressions that are evaluated from left-to-right/top-to-bottom, like this:

let rows = resultCollection |> filterBy(selectedCityName) |> orderBy(selectedColumn)

or like this:

let rows = resultCollection
|> filterBy(selectedCityName)
|> orderBy(selectedColumn)

instead of traditional inside-out/right-to-left function-application notation, like this

let rows = orderBy(selectedColumn)(filterBy(selectedCityName)(resultCollection))

Many people find the left-to-right order more readable, especially in cases like this where the filters are higher-order functions that take parameters.

// F#'s "pipe-forward" |> operator
operator infix |> { associativity left }
func |> <T,U>(lhs : T, rhs : T -> U) -> U {
return rhs(lhs);
}

--- andrewsardone

I did not know F# had the |> (pipe) operator – I thought it was unique to Elixir.

I wanted to tinker with this, so I'm glad to see someone else did it! I'll definitely be duping the radar.
swift  elixir  via:cdzombak  swiftlang 
june 2014 by andrewsardone
jspahrsummers/RxSwift
Proof-of-concept for implementing Rx primitives in Swift
swiftlang  reactive  reactiveprogramming  ReactiveCocoa 
june 2014 by andrewsardone
Twitter / clattner_llvm: Most perplexing feedback on Swift …
Most perplexing feedback on Swift: folks who see it (and judge it) as the end of a trek - but don't realize it is the start of a new world.
swiftlang 
june 2014 by andrewsardone
Chris Lattner – creator of LLVM and Swift
I started work on the Swift Programming Language (wikipedia) in July of 2010. I implemented much of the basic language structure, with only a few people knowing of its existence. A few other (amazing) people started contributing in earnest late in 2011, and it became a major focus for the Apple Developer Tools group in July 2013.
swiftlang  llvm  apple  programming 
june 2014 by andrewsardone
fullstackio/FlappySwift
A Swift implementation of Flappy Bird.
swiftlang  ios  github_repo 
june 2014 by andrewsardone
Twitter / benadida: There is little point in arguing language features…
There is little point in arguing language features of Swift vs. Go vs. Rust vs. Hack. Only one of them will let you easily build iOS apps.
swiftlang  rust_lang  golang  ios 
june 2014 by andrewsardone
Did Bret Victor work with Apple on the design of Swift Playground? - Quora
Lots of talk about Swift, the Swift playground, and the work of Bret Victor and what he’s presented on regarding the future of our tooling. There are similarities, and Victor did work at Apple, but it looks like (according to him) he did not work on Swift playground.

This isn’t a shocker, as so far I haven’t discovered any *new* ideas in Swift playground. I think Bret Victor would also be the first to say that most of his ideas and desires around tooling are not completely original, either. This is where you queue up the Smalltalk-ers and the Light Table users with their quips about being first in this area. While it’s true, Swift playground is still impressive: it’s (from what I’ve seen) one of the best executed interactive programming environments for a mainstream platform.
swiftlang  Bret_Victor  programming  tools  apple  ios 
june 2014 by andrewsardone
@gparker on a problem Swift is solving
Problem: C code is too primitive, C++ code is too fragile, and Objective-C code is too hard to optimize.
swiftlang  objective-c  c 
june 2014 by andrewsardone
graydon2 | Swift
Initial thoughts on Swift from the creator of Rust.
rust_lang  swiftlang 
june 2014 by andrewsardone

Copy this bookmark:



description:


tags: