When did I ever say that all languages ran with equal efficiency? I didn't, I know I can write assembly that runs faster than my C, and I know any compiled language is faster than an interpreted one. We're talking programmer efficiency here.From: "Andrew P. Lentvorski, Jr." <[EMAIL PROTECTED]> On Feb 3, 2005, at 10:14 AM, Gabriel Sechan wrote:
Yes I did. I disagree.
And you would be wrong, nonetheless.
http://compilers.iecc.com/comparch/article/93-09-134
There is a fundamental language difference that conforming compilers cannot ignore. C/C++ compilers *must* assume that arrays/pointers can alias with one another. Fortran compiles can assume that arrays/pointers cannot alias with one another.
On a tangent, why does that slow C down? I'm misunderstanding or missing something here. An array and a pointer in assembly are the same thing in any language- an address of the first element, with all elements coming one after another (possibly with some packing).
Besides, your statement about whichever language being the most familiar being the best is belied by all of the programmers who changed languages. If your argument were true, no one would ever change languages voluntarily.They change because they think it will be an improvement. That doesn't mean they're right.
Occasionally they get a quick boost because language X has something like regular expression matching that otherwise would need to be downloaded as a library. So it seems that X is quicker because otherwise they'd have to write a regular expression engine (or something that does part fo the work, anyway). However you're then not comparing the same problem space, you're comparing z work vs z+n work. Given a regex library in their prefered language, they'd be quicker in their prefered. Unless forced to by a boss or an existing code base, there *is no reason* ever to change. And I say this as someone who has used assembly (which I was pretty damn good in), C, C++, Java, Perl, Python, and ML at some point in his life, and all but ML and Java in production code.
I guess it boils down to beign disgusted at the way people treat language as a silver bullet. It isn't. It doesn't help. Changing to Python/Java/Ruby/Lisp will not make you a better programmer, a faster programmer, be easier to prototype in, etc. Even talking about language "problems" like memory management in C-likes ends up beign wrong- if you actually track defects, memory ones end up being a negligible percent, and they tend to be the low cost ones to fix as well. You just exchange them for a similar class of errors in Java/Python/other anyway. If you grab a reference from a data structure in those languages, are you getting a deep or shallow copy? The difference matters, and without studying the individual structure you can't know. It tends to be a harder problem to debug as well, althout thats probably my lack of experience in those languages talking.
What does help? Code reuse. Cleaner design. Especialy code reuse- a good 60-70% of what you do can easily be library-ized and put out under open source for others to use. You can then use their libraries, and the end result would probably be the most massive improvement in programmer productivity in history. Instead people continue to try and squeeze water out of rock by finding a language that will do the same thing. Its a waste of time, resources, and effort.
Gabe
--
KPLUG-List mailing list [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
