Quote:
Studies have shown that programmers write approximately the same number of lines of code per unit time in whatever language they happen to be programming in. A language like Python is 5-10 times less verbose than C (i.e., it takes 5-10 time more lines of code to do a task in C instead of Python). Thus, programmers are less efficient programming in C. Quote:
Quote:
Quote:
Jeremy |
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
Quote:
Quote:
Jeremy |
Quote:
You're wrong, plain and simple. First, "interpreted" is a poor term to use to apply to languages: most of the languages to which I imagine you wish this term to apply are actually compiled to bytecode and run in a VM. Second, you must realize that "interpreted" (as in "compiled just-in-time") languages are not by nature required to be garbage collecting; the two language features are orthogonal. Numerous garbage collecting languages are compiled to native code, include Lisp, Haskell, O'Caml, SML, etc. Thirdly, I don't think you have basis in fact for your statement: I believe the performance hit would most certainly be negligible, especially in a system where the VM for these languages remained resident in memory. But then again, neither of us can prove our statements. If you can think of a suitable benchmark, I'd certainly be happy to help prove either of our statements with you. Jeremy |
Quote:
Quote:
|
Quote:
Quote:
Quote:
Quote:
Jemfinch: I am sorry if I have offended you, but you seem to be writing to me as though I am an idiot. I have, at least some, basis in everything I have said, although I have admitted sometimes my comments were phrased generally when they were specific cases. You most likely understand that a lot of things like OO, like abstraction, and so on are theories and should be taken only as possible solutions. There are too many people that look at a project and go ``OO, data hiding'' ( yes, I know OO can perform data hiding and has a strong relation to it, but it does not implicitly imply it ). They do not even consider alternatives. Maybe OO is the best design method we have, maybe it is not -- I do not think either of us is equipped to state either way. May I note, I am not some C fanatic as I seem to end up being. I like C, but I use whatever language is applicable to my project at the time. The reason I defend C is that a lot of programmers look over all flaws in their language of choice and universally bash C. |
Quote:
My point was that a lot of these languages perform better natively when converted to C and then compiled in a C compiler. The C code to perform the same task is likely ( and from my experience in Scheme ) to be better written C then that that is generated from another language. I have tried to not generalise without reason, hence the reason I am only referring to a case with Scheme. This does not mean that lessons learned at not to some extent applicable in other languages. Another thing I would like to bring into consideration, and would like to hear others' view on, is the development time on projects. Now, I am not referring to ( as the other of this post originally was ) hobby codes, as I know you do not tend to do this, I am referring to professional work. I tend to find that a very large proportion of my time is spent in the language orientation free design phase of the project. I would assume that this is likely to remain fairly constant no matter what language I use, therefore I do not consider C taking slightly longer ( though, I do not think that twice as long, as claimed by some, is correct -- though I do concede to programmers writing approximately the same amount of lines of code a day ( and this is why the projects we do in assembly take so damn long =) ) ) to be as significant as a hobby programmer may. |
Quote:
Garbage collection, when done properly, is usually faster than manual memory management. (It allows memory to be deallocated whenever the program is not using much CPU, and it can reduce memory fragmentation). Your points about Scheme are quite valid, but Common Lisp is another story. There are some very good LISP compilers out there that produce native code that's in the same league as C/C++ in terms of speed. Alex |
Quote:
|
Seems like someone is trying to convert people to python. Oh wait the industry at the moment is nothing but C/C++ mixed with some java and unfortunatly some visual basic. You want to work you know those languages. You want a hobbie? Learn python.
|
Quote:
|
Happens when MS tries to push something like it down the throat. Though i've played around with it a bit and it ain't that bad actually.
|
I use C# almost exclusively at work because we are working with SOAP WebServices for a number of things. However, even there, I find myself using C/C++ to right DLLs because there are times when we need to access a C or C++ API and trying to import all that into a C# app would be more effort than it is worth. As an example, we may soon be working with OpenSSL. It is going to be vastly easier to write what we need to do with OpenSSL in C/C++, then just provide a simplified interface that can be used from C#. In this case, I'm actually thinking we will probably create a Managed C++ assembly.
For my home projects, I generally use C/C++ exclusively, because most of my home projects involve graphics with OpenGL. I did do a project that used Managed C++ to provide a C# interface for OpenGL, but just as a way to familiarize myself with Managed C++. I still prefer to use C/C++ for OpenGL because then I can use most of the same code for both Windows and Linux. Plus, with graphics programming, performance is usually somewhat important. Especially if you are working with video cards with no 3d accelleration. |
Quote:
|
You named your thread why use C/C++ so that is a valid response like it or not.
|
All times are GMT -5. The time now is 05:56 PM. |