サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
chris.eidhof.nl
Why we should be critical of using protocols In Swift, protocol-oriented programming is in fashion. There’s a lot of Swift code out there that’s “protocol-oriented”, some open-source libraries even state it as a feature. I think protocols are heavily overused in Swift, and oftentimes the problem at hand can be solved in a much simpler way. In short: don’t be dogmatic about using (or avoiding) prot
Implementing Copy-on-Write efficiently In our book Advanced Swift, we show how to implement your own copy-on-write structs in detail. This blogpost shows the same technique, but in less detail. One big difference between Swift strings and Cocoa strings is how they deal with mutability. If you define a Swift string using let, the compiler enforces immutability: there is no way to change the string:
Combining getters and setters for great glory This is another FP-inspired blogpost, this time about lenses. There’s a lot of literaturearound lenses, but I wanted to show some simple examples. Sometimes, you have a set of data (this could be anything, from a struct to a Core Data database, or a webservice), and you want to create a view on that data. For example, suppose you have a value of type P
Wrapping View Controllers in a Functional Way I’m working on something new: a functional wrapper around view controllers. Making view controllers simpler has been a long obsession for me. I think functional view controllers might make them even simpler. This is still very much work in progress, but I hope that over the next months I can flesh out something nice. For this article, we’ll work with a
If you're looking for a cool library to build If you are looking for some programming projects to port to Swift, my list is way bigger than I can tackle. Most ideas here are ports of libraries from other languages, some are different. I would love to build all of these, but can’t possibly do even ten percent of this list. The list is in random order. An SVG Parser that can parse SVG, turn it into
このページを最初にブックマークしてみませんか?
『chris.eidhof.nl』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く