[Ironruby-core] Comparing CLR strings and Ruby strings - a slightly surprising behaviour

Meinrad Recheis meinrad.recheis at gmail.com
Fri Mar 6 02:46:49 EST 2009


Well, it slightly relates to syntax ... because basic ruby types (string,
numeric, array, hash, range, etc.) use to print valid ruby syntax on
inspect. This is very useful for reinterpreting values stored as strings by
the use of inspect.
-- henon

On Fri, Mar 6, 2009 at 7:04 AM, Tomas Matousek <Tomas.Matousek at microsoft.com
> wrote:

> This is not about syntax. This is just what System::String#inspect prints
> out.
>
> Tomas
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:
> ironruby-core-bounces at rubyforge.org] On Behalf Of Tinco Andringa
> Sent: Thursday, March 05, 2009 6:26 PM
> To: ironruby-core at rubyforge.org
> Subject: Re: [Ironruby-core] Comparing CLR strings and Ruby strings - a
> slightly surprising behaviour
>
> Wouldn't using different syntax especially for clr just amount to
> creating a new language instead of implementing Ruby on the dlr? (Not
> to mention a language that's not very intuitive)
>
> On Thu, Mar 5, 2009 at 23:00, Orion Edwards <orion.edwards at gmail.com>
> wrote:
> > I like backticks more than single quotes, but ideally you'd just have the
> > same quotes and make them red or something for clr strings.
> >
> > On Fri, Mar 6, 2009 at 10:21 AM, Pete Bacon Darwin
> > <bacondarwin at googlemail.com> wrote:
> >>
> >> How about back ticks? `Some string`?
> >>
> >> Since ruby can have single quote string literals it might not be that
> >> obvious that 'Some string' it is not a normal Ruby string.
> >>
> >> Pete
> >>
> >> -----Original Message-----
> >> From: ironruby-core-bounces at rubyforge.org
> >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas
> Matousek
> >> Sent: Thursday,05 March 05, 2009 21:03
> >> To: ironruby-core at rubyforge.org
> >> Subject: Re: [Ironruby-core] Comparing CLR strings and Ruby strings - a
> >> slightly surprising behaviour
> >>
> >> I'm going to use single quotes for formatting CLR strings via inspect.
> >> "clr:" prefix is too long and it gets in your way when working mostly
> with
> >> CLR strings.
> >>
> >> >>> "Some string"
> >> => "Some string"
> >> >>> "Some string".to_clr_string
> >> => 'Some string'
> >>
> >> Sounds good?
> >>
> >> Tomas
> >>
> >> _______________________________________________
> >> Ironruby-core mailing list
> >> Ironruby-core at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/ironruby-core
> >
> >
> > _______________________________________________
> > Ironruby-core mailing list
> > Ironruby-core at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/ironruby-core
> >
> >
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090306/be916d22/attachment-0001.html>


More information about the Ironruby-core mailing list