From: "Larry J. Elmore" Date: 2001-01-16T11:40:02+09:00 Subject: [ruby-talk:9354] Re: 101 Misconceptions About Dynamic Languages In article <01d001c07f08$82e2c720$2e03280a@puma>, "Christian" wrote: > Let's quit the small talk. OF COURSE, C++ is both strongly and > statically typed. That is a good description of what C++ *is*. But it is not type-safe. > If your answer includes the term 'prototyping' you don't understand > C++. > > template void foo(const Ty& X) > { X.bar(); } > > template void foo(Ty& X) > { X.bar(); } > > Sure, it is more noisy than > > class UnnecessaryScopeGivenNamespaces > def foo(X) > X.bar > end > end Ada 95 generics are a far cleaner solution than C++ templates. > 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. Most code is read many more times than it is written. When something needs to be fixed or updated, it's important to me to be able to quickly comprehend something I did months ago or perhaps someone else did years ago. Even in debugging current code, I read it a lot more than I write it! IMHO, Ada is far preferable to C++. I'm new to Ruby, but it seems to be an ideal prototyping language, I'm using it at work in a big way now. > My perspective is for practicality, not expediency. A subtle but > important difference. Note that practicality includes notions of 'ease > of use' and > 'prototyping' and 'efficiency' and 'readability' and > 'maintainability'. It > does not *necessarily* include 'instantaneous understanding' or 'the > smallest amount of work possible for a given specific circumstance'. > To para phrase, anything that takes no time to understand is not worth > understanding. But there's no reason to be a masochist and make things harder than they need be! > At least in C++ I often get told about a problem before it happens. > Admittedly, it is not a permissive language. Then again, nor is any > useful language. Conversely, if it is, it can more correctly be termed > 'noise'. Yes, I exagerate to clarify. Ada 95 is superior here, too. Ever notice how many high-priced tools there are for detecting problems with C++ programs? Especially memory leaks and bad pointers. Ada catches the vast majority of that kind of stuff out of the box. > I realise that I am now attacking the precise notion of an interpreted > language. Oops. To the mailing list of an interpreted language. Oops. > But hey, I call 'em like I see 'em. And the way I see it is that .NET > and Windows scripting (via XML) pretty much makes 'interpreted' > languages like Python and Ruby obscelete. Don't 'like' MS? Whatever. > Your company is *nix only? Sorry. My company is half Linux half Win2k. > I once cared about the difference. Now I care about practicalities. It's hardly as though .NET has already swept the world. It may very well fail. Who knows? > Ease of use? C++ has very few keywords, and yet has extreme depth. That's one big flaw right there. In trying to keep the keyword count down, there's several keywords with multiple meanings depending upon context. Ada 95 is criticized as being big and verbose, yet the C++ standard is _longer_ than the Ada 95 standard, and IIRC, the Booch library implementation in Ada 95 has significantly fewer lines of source code than the C++ version. > Functional programming? C++. Generic programming? C++. Object oriented > (yuck) programming? C++. What experience do you have with functional programming and FP languages? If you think C++ templates are great, you've obviously never used Ada 95's generics. Ada packages and child packages are so incredibly superior to C++'s #ifdef, #include, etc. directives for large projects that it's laughable. In that regard C++ is hardly superior to good macro assemblers of 30+ years ago! > Meta-programming? C++. This is far more important than anything else. Never used Lisp, huh? > My point? Times change. And the more things change the more things > stay the same. Thanks for reading this far. It's been entertaining... Larry