[MacRuby-devel] Neat MacRuby app, HotCocoa, and more!
Leigh Caplan
texel1 at gmail.com
Sun Nov 14 21:29:50 PST 2010
I had digest mode turned on, so this reply might be orphaned. Sorry in advance if that's the case.
Thanks Matt for showing me your HTTP wrapper... there are some good ideas there.
In reply to Josh, what would be the advantages of using NSURLConnection as the transport for the net/* libraries? I can see that having access to two different built-in mechanisms for dealing with the network may be confusing; I used NSURLConnection as an example, but there are many facets of Cocoa which don't have corresponding support in Ruby, and that's where I see a great opportunity for a wrapper library. I just find it way easier to reason about my code if async callbacks are defined inline using procs and the like.
I can also see disadvantages to this approach, such as extra indirection whilst debugging, and potential for more memory usage if the implementers (read: me) aren't careful about making sure that stored procs eventually go out of scope.
Additionally, it probably wouldn't make sense to wrap everything in all the frameworks– we could probably identify logical groups of classes where having more Ruby-like conventions would be a good fit. I'll go over Foundation.framework in the next week and see if I can do just that.
Leigh
More information about the MacRuby-devel
mailing list