On Jul 15, 2004, at 1:10 AM, James Giles wrote: > Paddy O'Brien wrote: >> Drew McCormack wrote: > ... >>> The >>> algorithm you choose can often be much more important than the extra >>> cycles a compiler can save you. An advantage with C++/Java like >>> languages is simply that they are better at abstraction, and this can >>> make writing complex algorithms easier. The fortran version of the >>> algorithm would nearly always run faster, but writing the fortran >>> version may be considerably harder. >>> >> I find it very difficult to agree with this statement. I've lost >> track >> of who said what, but several (IIRC, notably James Giles, who is one >> of >> several whose opinions I value) have said the other way around. I.e., >> it is harder to write other than Fortran to mimic what Fortran can do. > > The claim that inheritance-based code improves productivity > is so common that I usually don't respond to it. There's never > been any objective evidence to support the claim that objective > coding is more productive. That's not been from lack of looking. > There are people (say, in the ACM) who would jump through > hoops to find verifiable evidence that inheritance is productive, > but no such luck. I think the increased abstraction usually > serves more to confuse than to help. Well, obviously the Fortran 2003 committee disagree, because it's in there. I do agree that you can overuse inheritance, which is why a Java 'interface' construct would have been nice. I also agree inheritance is less useful in scientific programs, but it can still be useful at the highest level to structure programs. I can't point to any study to prove OO is a good thing. All I can say is that nearly every piece of complex software you use in a modern GUI operating system is written in an OO language, and for good reason. I've seen very complex software written by one or two developers using OO technologies, that simply would not be possible writing everything from scratch in a procedural language. OO makes reuse of software easier, because objects manage their own data. I can also speak from personal experience: I find myself much more productive working in certain OO languages. I have recently been working in C++, and I must confess, I don't think my productivity is higher in that language. It has nothing to do with OO, but simply to the complexity of C++, and lack of features like garbage collection. > > The operative phrase in Drew McCormack's statement is "they > are better at abstraction, and this *can* make writing complex > algorithms easier." (My emphasis) Maybe they *can*, if programmers > are properly trained to do so and to avoid the pitfalls. Are they? > Can we expect that they will be? I think the longer learning curve > of such techniques is so long that most actual coders (those that > actually write programs) move to higher positions in their companies > before getting that good! If you are talking about C++, I agree. Learning C++ is hard. But you shouldn't confuse C++ with OO in general. There are easy-to-use OO languages (I am particularly productive in Python, for example), and I hope that there will one day be one that is as powerful as C++, without the unnecessary complexity. Maybe "D" is that language (www.digitalmars.com), or maybe it is Java. Or maybe it is Fortran. I guess we will have to wait and see. Drew --------------------------------------------------------- Drew McCormack www.maniacalextent.com