Found 16 bookmarks
Custom sorting
Brandon’s introduction to protocol witnesses
Brandon’s introduction to protocol witnesses
Protocol-oriented programming is strongly recommended in the Swift community, and Apple has given a lot of guidance on how to use it in your everyday code. However, there has not been a lot of attention on when it is not appropriate, and what to do in that case. We will explore this idea, and show that there is a completely straightforward and mechanical way to translate any protocol into a concrete datatype. Once you do this you can still write your code much like you would with protocols, but all of the complexity inherit in protocols go away. Even more amazing, a new type of composition appears that is difficult to see when dealing with only protocols. We will also demo a real life, open source library that was originally written in the protocol-oriented way, but after running into many problems with the protocols, it was rewritten entirely in this witness-oriented way. The outcome was really surprising, and really powerful. https://twitter.com/mbrandonw https://appbuilders.ch
·youtube.com·
Brandon’s introduction to protocol witnesses
Seemingly Impossible Swift Programs
Seemingly Impossible Swift Programs
I begin to feel that I can trust mathematics as a guiding beacon for how programming can be done well. This is why I feel strongly that simple mathematical constructs, like pure functions, monoids, etc., form a strong foundation of abstraction as opposed to the overly complicated, and often ad-hoc, design patterns we see in software engineering. ​ I spend a lot of my time trying to find new and creative ways to bring seemingly complex functional programming ideas down to earth and make them approachable to a wider audience. ​ but it does give us an opportunity to explore a strange and surprising result in computation and mathematics. It can help show that the connection between the two topics is perhaps deeper than we may first think.
·fewbutripe.com·
Seemingly Impossible Swift Programs
Reducer Composition
Reducer Composition
Check out @mbrandonw's talk on how reducers compose, which covers how you can build up with a big ole "appReducer" out of all the smaller reducers in your code base:https://t.co/VFkcZyVxrr— Stephen Celis (@stephencelis) October 20, 2018
·twitter.com·
Reducer Composition