Subj : Re: Compiler and an interpreter To : comp.programming From : Jon Harrop Date : Fri Aug 05 2005 01:32 pm Gerry Quinn wrote: > In article <42f1e845$0$24015$ed2619ec@ptn-nntp-reader01.plus.net>, > usenet@jdh30.plus.com says... >> No. Witness the dozens of curly braces in my slightly longer example. > > I meant the includes. But a curly brackets is not really equivalent to > a typical "line of code" anyway. As programs grow and code is split between many files, the number of includes will also grow, albeit slowly. >> As programs get bigger, I'd rather write less code. > > LOC is a poor metric for most purposes - it's reciprocal is equally > poor. The bottom line, in any case, is that typing speed is not a > bottleneck for most programmers. Reading speed is. >> > I have doubts whether set theoretic operations in STL are designed, or >> > at least implemented, for efficiency. Certainly if I wanted to write >> > an efficient program in the sphere referred to, I would carefully >> > consider my choice of data structures. >> >> You should study the STL... > > Look what it did to you! Seriously, by your own account your excessive > respect for arcane STL features eventually resulted in your abandonment > of the language. No, the presence of a language that lets me write shorter, faster code in less time led to my abandonment of C++. The STL lets me write shorter, faster C++ code so it actually made C++ more competitive. C++ simply cannot compete though. > Certainly, I'll look at the STL, or any library, to see if it has what > I need. But efficient code requires a certain amount of attention to > the computer's needs also. The OCaml code is efficient and required no such "attention". >> Perhaps if you give some examples of applications that you believe FPLs >> are poorly suited to? > > Computer games would be a good example. What aspect of games and what types of games do you think FPLs are not suitable for? I assume you know that several professional games houses use FPLs? >> Yes. Why do you think these real-world performance-critical programs are >> "invalid" as benchmarks? > > Because you appear to use unsuitable methodologies in your C++ > versions. What do you believe is a "suitable methodology"? >> I don't know what you think constitutes the "vast bulk of computer >> programming" but you'll find substantially more complicated algorithms >> and data structures in graphics, databases, games and so on. Most of >> these would be more easily and efficiently coded in OCaml than C++. > > There may well be complex algorithms implemented here and there in all > sorts of software, but the bulk of most programs consists of simple > structures, marshalling of resources, user interfaces etc. I don't seem to spend most of my time writing simple functions... -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .