From: Minkoo Seo Date: 2006-06-25T02:43:05+09:00 Subject: Re: Ruby goodies? ------=_Part_2461_5175876.1151170982766 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi. I've had similar feeling recently and tried to translate what I can do in Ruby into Java. And it turns out that data structure facility in this language is very much powerful. Consider: list = [1,2,3,4,5] # How would you do this list creation in C#? list = { 1=> 'a', 2=> 'b' } # How could you initiate a hash with these default values? You'll find that such a simple initialization turns out to be complicated in C# and/or Java. Also, consider: (1..100).to_a.min # This returns 1 which is the smallest number between 1 to 100. Do you think it would be possible to write such a succint code in C#? Not only metaprogramming facility - which is awesome btw - but also data structures are playing crucial role in this language. Sincerely, Minkoo Seo On 6/22/06, Roger Johansson wrote: > > Im a C# programmer and Im totally new to Ruby. > > What would you guys say is the main benefits of Ruby over C#? > C# has closures and is getting lambdas in C#3 > > So in what scenarios should I absolutely go for Ruby instead of C#? > > One of the benefits that I've found myself is the reflection/runtime > modification support. > > When I implemented my .NET AOP lib NAspect in .NET it took a few good > months to make it work. > > In Ruby it took me about 5h to get support for pointcuts, interceptors > and the whole kit. > So that part was pretty amazing. > > but are there any other areas where ruby really shines, or are all of > the goodies related to the abillity to modify things on the fly? > > //Roger > > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_2461_5175876.1151170982766--