From: Andreas Semt Date: 2005-01-20T02:29:54+09:00 Subject: Re: value by reference Florian Gross wrote: > trans. wrote: > >>> sorry if this offends, but there is no less blunt way to say it. >>> if anyone need it. they've gone wrong already. >>> the solution: design >> >> That's silly. By that line of reasoning, nearly every other language >> has got it wrong. Wrong must be pretty good since Ruby is no where near >> as popular as those languages that can do this sort of thing. > > > No, other languages use other models that need this. They don't work > like Ruby which is why they need it. Ruby needs other features that > those languages don't have in certain cases, but over all I have to say > that Ruby did a good job at being simple and consistent which is one of > the top reasons I like it so much. Everything just makes sense once you > understand the basics. > > There's multiple approaches to this, but they should not be mixed. > >> I think the problem with Ruby is that it _can be done_ if you use >> certain _types_ of objects, but not others. That to me goes against the >> feather of our friendly duck. > > > No, it can not be done. You can never modify a variable that appeared in > your method invocation. You can change the Objects that you're methods > gets in case they are value Objects, but that's how OOP works. It makes > sense to be able to have entities that can change their state at run time. > > > A nice discussion. Florian should write a book! :-) Greetings, Andreas