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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071206/97c55dcd/attachment.html
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 Darwin <bacondarwin at googlemail.com> 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 > > _______________________________________________ > 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/20071206/5fff0e24/attachment.html
You should return MutableStrings and also accept MutableStrings as parameters. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eduardo A. Flores Verduzco Sent: Thursday, December 06, 2007 2:19 PM To: ironruby-core at rubyforge.org 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 Darwin < bacondarwin at googlemail.com<mailto:bacondarwin at googlemail.com>> 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 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto: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/20071206/2b9bf14a/attachment-0001.html
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. - John