Re: [MacRuby-devel] Hash Table

2011-04-18 Thread Caio Chassot
On Mon, Apr 18, 2011 at 20:18, Joshua Ballanco wrote: > they aren't...quite... The issue is that if you need a string, sometimes an > NSString is sufficient and in those cases you'd want the NSString to report > itself as being the same as a String. In other cases, however, they are > different be

Re: [MacRuby-devel] Hash Table

2011-04-18 Thread Joshua Ballanco
Actually, it's quite a bit more complicated than that. NSString, NSDictionary, and NSArray are class clusters. In practice, you are never actually dealing with an "NSString", but rather a specialized subclass in the class cluster. Originally, String in MacRuby was implemented using NSCFString (one

Re: [MacRuby-devel] Hash Table

2011-04-18 Thread Joe West
On Mon, Apr 18, 2011 at 10:40 AM, Ricky Chilcott wrote: > > I'd noticed that too. I thought Strings were actually NSStrings. > They are NSMutableStrings/NSStrings underneath: irb(main):013:0> "string".class.ancestors => [String, NSMutableString, NSString, Comparable, NSObject, PP::ObjectMixin, K

Re: [MacRuby-devel] Hash Table

2011-04-18 Thread Ricky Chilcott
I'd noticed that too. I thought Strings were actually NSStrings. Ricky On Apr 18, 2011, at 9:52 AM, Petr Kaleta wrote: > Btw: it seems, that something has changed in ruby primitives classes > implementation, described in here > http://www.macruby.org/documentation/tutorial.html (this example

Re: [MacRuby-devel] Hash Table

2011-04-18 Thread Petr Kaleta
Btw: it seems, that something has changed in ruby primitives classes implementation, described in here http://www.macruby.org/documentation/tutorial.html (this example http://cl.ly/2Y382r0w331O230z1Q3D) because "foo".class is not NSCFString but String http://cl.ly/110Y0O0D1k3y1G2e2j2X - Petr

[MacRuby-devel] Hash Table

2011-04-18 Thread Petr Kaleta
Hi I'm a little bit confused about basic ruby classes implementation. Ruby Hash is internally implemented as NSDictionary/NSMutableDictionary? So for example if I need to implement hash table, I can use ruby Hash? So the performance will be exactly same compared to NSDictionary? - Petr