From: Mike Stok Date: 2001-11-21T23:04:38+09:00 Subject: [ruby-talk:26018] Re: string concat and .to_s On Wed, 21 Nov 2001, Dave Thomas wrote: > Third is a question of interpretation. You'd like "fred" + 1 to be > "fred1". How about "2" + 1? "21", or 3? There's a boat load of Perl > folks who'd argue for the latter. Which is right? Or should we have > both, depending on whether the string is a number or not? The boatload of Perl people would say that the use of + as an operator rather than . supplies the context. In a language which uses the same operator for string concatenation and addition then it's probably better to have the .to_ clearly indicating the writer's intention. Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@starnix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.starnix.com/ | 75D2 9EC4 C1C0 0599 13DA