[Rubycocoa-devel 1163] Re: %w{ NSString NSArray NSNumber NSDictionary }.map {|klass| Object.const_get(klass).class_eval do; define_method :inspect do; end; end; }

Zurück zum Archiv-Index

Eloy Duran eloy.****@gmail*****
Sat Sep 8 20:12:43 JST 2007


Hey Satoshi-san,

I think we should at least show the full classname, so OSX::NSCFString etc.

The id's are indeed a point of debate, because also with ruby's
String, Array, Hash, and Numeric the #inspect method doesn't show the
id....

Eloy

On 9/8/07, Satoshi Nakagawa <snaka****@infot*****> wrote:
> Hi.
>
> I prefer shorter form.
>
>   <NSString "foo">
>   <NSNumber 99.99>
>   <NSArray [<NSString "foo">, <NSNumber 99.99>]>
>   <NSDictionary {<NSString "foo"> => <NSNumber 42>}>
>
> or
>
>   <NS "foo">
>   <NS 99.99>
>   <NS [<NS "foo">, <NS 99.99>]>
>   <NS {<NS "foo"> => <NS 42>}>
>
> Because these types are value types, so we don't need to
> know their ids.
>
> --
> Satoshi Nakagawa
>
> _______________________________________________
> Rubycocoa-devel mailing list
> Rubyc****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel
>




More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index