

Show HN: Bond – A Swift binding framework - srdanrasic
https://github.com/SwiftBond/Bond/tree/v1.0

======
josephlord
This looks quite cool. Kind of like a lighterweight less invasive
ReactiveCocoa. Obviously less powerful but with a lot less complexity and need
to make it core to your app.

~~~
srdanrasic
Thank you. My primary goal was to make it simple because when it's simple,
it's harder to make a mistake.

------
wxs
One thing I've found frustrating with Swift, and that we've had to deal with
in libs we've built, is that there is an unavoidable boilerplate of placing an
`[unowned self]` at the top of your callbacks (e.g. `map` in the linked
framework), or else you introduce a reference cycle.

If you forget this `[unowned self]`, which is very easy to do, everything
compiles fine and now you have a subtle memory issue to track down. I wish
there was a language construct to allow you to define closures that have every
captured variable unowned (or weak) by default.

I would, at the very least, emphasize somewhere in your docs with big bold
letters how important it is to add the boilerplate, or users of Bond will
definitely get bitten by this.

~~~
srdanrasic
I agree. Thanks, it's a great suggestion.

------
coob
With all the binding frameworks for iOS I wonder why Apple haven't reinstated
native Cocoa bindings that exist on OS X.

------
lyinsteve
This looks really amazing. Probably the most simple implementation of FRP I've
ever seen, nonetheless in Swift.

------
rjsamson
This looks really great - especially the simplicity of all of it - great work!

