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

Back to archive index

Eloy Duran eloy.****@gmail*****
Mon Sep 10 02:08:44 JST 2007


Committed in rev 2038.

Eloy

On 9/9/07, Satoshi Nakagawa <snaka****@infot*****> wrote:
> I agreed.
> I think it's good.
>
> --
> Satoshi Nakagawa
>
>
> On 2007/09/09, at 2:39, Laurent Sansonetti wrote:
>
> > I vote for this :)
> >
> > What do others think?
> >
> > Laurent
> >
> > On Sep 8, 2007, at 7:03 PM, Eloy Duran wrote:
> >
> >> Ok, so do we then settle on the following?
> >>
> >> #<NSCFString "foo">
> >>
> >> #<NSCFArray [#<NSCFString "foo">, #<NSCFNumber 99.99>]>
> >>
> >> #<NSCFNumber 99.99>
> >> #<NSCFNumber true>
> >> #<NSCFNumber 42>
> >>
> >> #<NSDictionary {#<NSCFString "foo"> => #<NSCFNumber 42>}>
> >>
> >> On 9/8/07, Laurent Sansonetti <lsans****@apple*****> wrote:
> >>> I think we should keep the full class names. It's important for
> >>> consistency, since all other #inspect methods return them. We could
> >>> nevertheless drop the OSX prefix in all #inspect methods.
> >>>
> >>> The IDs are interesting to determine if 2 objects of the same value
> >>> are different instances, or the same object. Originally I was
> >>> thinking
> >>> about keeping them too, but I revised by judgment. ObjC doesn't
> >>> reveal
> >>> them in the primitive types [-description] methods, so we shouldn't
> >>> need too. One can still call #ocid to determine the ObjC address.
> >>>
> >>> Laurent
> >>>
> >>> On Sep 8, 2007, at 1:12 PM, Eloy Duran wrote:
> >>>
> >>>> 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
Back to archive index