[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Languages etc



On Sep 23, 2005, at 11:22 PM, Al Davis wrote:
used properly.  Java programs that are slow are mostly slow because
... 1) Java programmers often program in a way that's prone to be
slow, they
generalise things a lot, they write programs that produce a lot of
objects and need a lot of GC.

I have to speak up in agreement here. I'm a procedural programmer (C, mostly) but I've worked on quite a few Java projects over the years. I have narrowed this problem down to programmers whose first exposure was to object-oriented languages like Java or C++.

This is not true.

Well, perhaps not in YOUR opinion.

  Given a choice, I prefer someone who started an
object oriented language, all else being equal.  But someone who only
knows from that first course, and nothing else, is a big problem,
regardless of language.

I have to agree with your latter point, but not the former. I've seen nothing but grief from those situations.


Thinking
*exclusively* in object-oriented terms tends to result in
unbelievably inefficient code, because computers are inherently
procedural things, and pretty, nicely-abstracted object-oriented code
gets turned into a most decidedly procedural instruction stream at
the time of compilation or execution.

Thinking exclusively one way leads to problems. There are many ways to look at a problem. Forcing everything to one way, or blindly avoiding an approach both are bad.

I wasn't advocating blind avoidance of object-oriented languages. I suggested that they cause problems when used by people who don't know how computers work.


In principle I agree with your assertion that thinking exclusively one way leads to problems, but in practice that is an overly idealistic attitude. The simple fact remains that today's computers ARE procedural things, whether you like procedural languages or not...and mapping nonprocedural programming paradigms to procedural constructs involves overhead, no matter how you slice it.

That last sentence is true, and would still be true if he used C, guile,
or anything else. Object oriented is not the problem. Incompetence
is.

Right. And object-oriented programming languages give newbies enough rope to hang their project managers, and enough comfort so they don't realize they're incompetent.


   The world is filled to overflowing with Java and C++ code that
does stupid things like this.

and C, Pascal, Fortran, scheme, python, .... If I left out your favorite language I apologize.

Sigh.

Don't blame the language.

I'm blaming a combination of programmers and a programming paradigm. Go back and read my earlier message. Many people have written Java code that is SCREAMING fast, and I personally have done so as well. I *like* object-oriented techniques. Enough with the knee-jerk defense of YOUR favorite language(s), ok?


          -Dave

--
Dave McGuire "You'll have to be a lot more specific than 'that
Cape Coral, FL girl last night.'" -Ted McFadden