Ruby uses back-ticks for shell strings, so it doesn't seem to be more obvious 
that the value is CLR string.
I agree it's not blatant. It's a small hint that should help you to distinguish 
the types. CLR strings will have most of the methods Ruby string have (except 
for mutable ones) so the difference is not so important in most scenarios.

Tomas

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Pete Bacon Darwin
Sent: Thursday, March 05, 2009 1:22 PM
To: [email protected]
Subject: Re: [Ironruby-core] Comparing CLR strings and Ruby strings - a 
slightly surprising behaviour

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: [email protected]
[mailto:[email protected]] On Behalf Of Tomas Matousek
Sent: Thursday,05 March 05, 2009 21:03
To: [email protected]
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
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to