Along the lines of the discussion before about raising exceptions: Is it
acceptable to return .NET strings from library methods or should we be
trying to use MutableString instances?
Pete
Along the lines of the discussion before about raising exceptions: Is it
acceptable to return .NET strings from library methods or should we be
trying to use MutableString instances?
Pete
Good question… I’m using always MutableString inside my StringIO
implementation but I’m not sure if it’s ok…
On Dec 6, 2007 3:54 PM, Peter Bacon D. [email protected]
You should return MutableStrings and also accept MutableStrings as
parameters.
Tomas
From: [email protected]
[mailto:[email protected]] On Behalf Of Eduardo A.
Flores Verduzco
Sent: Thursday, December 06, 2007 2:19 PM
To: [email protected]
Subject: Re: [Ironruby-core] MutableString vs string
Good question… I’m using always MutableString inside my StringIO
implementation but I’m not sure if it’s ok…
On Dec 6, 2007 3:54 PM, Peter Bacon D. <
[email protected]mailto:[email protected]> wrote:
Along the lines of the discussion before about raising exceptions: Is it
acceptable to return .NET strings from library methods or should we be
trying to use MutableString instances?
Pete
Tomas:
You should return MutableStrings and also accept MutableStrings as
parameters.
Yup.
Long term, we’ve talked about some action binder magic that would
automatically convert MutableString <-> System.String for calling .NET
methods. But that’s a long way off, so use MutableStrings for now.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs