3 ms·
Show HN: Bond – A Swift binding framework
- josephlord 12y agoThis 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 12y agoThank you. My primary goal was to make it simple because when it's simple, it's harder to make a mistake.
- coob 12y agoWith all the binding frameworks for iOS I wonder why Apple haven't reinstated native Cocoa bindings that exist on OS X.
- rjsamson 12y agoThis looks really great - especially the simplicity of all of it - great work!
- wxs 12y agoOne 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 12y agoI agree. Thanks, it's a great suggestion.
- lyinsteve 12y agoThis looks really amazing. Probably the most simple implementation of FRP I've ever seen, nonetheless in Swift.