From: Kevin Smith Date: 2001-01-16T16:57:27+09:00 Subject: [ruby-talk:9365] Re: 101 Misconceptions About Dynamic Languages Christian wrote: >The more I look into Python/Ruby, the more I like C++. To avoid a rant, skip >to the next message. I'm a long-time C++ guy who has now written a couple thousand lines of "production quality" Ruby code. When I went back to C++ I found myself cursing because I missed some of Ruby's features. The single biggest Ruby feature that I feel lost without in C++ is code blocks. Being able to set up simple "callbacks" the way Ruby does is just so sweet. C++ has nothing like it. Other minor nits: I am now annoyed by having to put semi-colons everywhere, having to declare methods in addition to defining them, and by having to suply empty parens to indicate a function call with no parameters. I also miss the clean simplicity of built-in array and hash classes. On the pro-C++ side, I still draw comfort from a clean compile. I don't think I would ever feel safe in Ruby without a suite of unit tests exercising all the things that can go wrong in my code at run-time. >But who gives a care about syntax when you care about code (that is, >expressiveness and efficiency). How much do you read code compared to how >much that code is executed? Carts and horses. There is a real, practical, >absolute difference between a const-reference and a non-const-reference, >especially in distributed systems (which is why I chose such a >non-flattering example). Code clarity is paramount. Ruby seems slightly better to me, just because it requires less hand- waving and "noise". They are both in the same ballpark on this, however. Kevin