Git Product home page Git Product logo

either's Introduction

Many Types Make Light Work

This is the talk which I gave at NSScotland 2014 in Edinburgh on October 26, 2014. I will be giving it at NSNorth 2015, April 10-12, 2015.

The talk is written in Deckset-flavoured Markdown.

A recording of my presentation of v1.0 of this talk at NSScotland is available.

Synopsis (for the conf)

Every programmer regularly faces the challenges of managing complexity and change. Subclassing can help us simplify, by sharing code and interfaces between related parts of our program. But when requirements change out from under our class hierarchy, unanticipated fragility can mean bugs, sweat and tears. Swift offers us a better way.

TL;DR

Subclassing is a broken idea, so factor & compose instead where possible, and when Cocoa makes you subclass, do it in a factored, composable way.

either's People

Contributors

335g avatar abizern avatar alexrozanski avatar angerman avatar bencochran avatar cristianames92 avatar gfontenot avatar morishin avatar neilpa avatar nxtstep avatar pocket7878 avatar robrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

either's Issues

Pinning Cartfile to SHA cause updated dependencies won't be used.

Cartfile pins dependencies to SHA.
After carthage update on Stream, Cartfile.resolved is following:

github "robrix/Box" "18d05a56845837eea90a36854c67de2520983bf8"
github "robrix/Prelude" "180e9ae5e60ec47abd8f3e0fa68cafbbbd160abe"
github "robrix/Memo" "1.1.4"
github "robrix/Either" "1.2.1"

I'v noticed by fails on building Prelude on building Either on building Stream.
Thanks

`.map`

Maps .Right instances to a new type, leaves .Left ones alone.

let result: Either<T, U> = 
return result.map(const(Int)) // => Either<T, Int>

Free functions

Are free versions of flatMap and map something you'd be interested in merging?

`>>-`/`.bind`

(Either<T, U>, U -> Either<T, V>) -> Either<T, V>

iOS target?

I tried to use Either in a combined Mac/iOS library I'm developing, but looks like this project is only configured for Mac targets. Any reason not to add iOS as well?

Push update to Cocoapods master repo?

Would it be possible to keep the Cocoapods podspec up to date, and to push the newest version of Either to the Cocoapods master repo? I realize there's a naming conflict with this project.

pod 'Either', :git => "https://github.com/robrix/Either", :tag => '2.0.0'

is fine. Just thought I'd ask!

"No available version …" when adding to Cartfile.

Adding github "robrix/Either" to my project's Cartfile and running carthage update produces the following error message:

$ carthage update
*** Cloning Either
No available version for github "robrix/Either" satisfies the requirement:
$ |

I suppose it's because Either has no versioned commit tag (or "release") yet?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.