Java's performance far better that optimized C++

I

Ioannis Vranos

Julie said:
Your comments have been noted -- I'll review my prior comments and make the
appropriate changes.

Thanks



I think you are facing what I faced the first time I joined another
programming language Usenet group. The group is highly technical and its
casual users strict in accuracy.


You must get used to it, or you will "burned" out. However *no one* has
anything personal with you and the "burn" will stop immediately when you
express yourself accurately and start get used to others' criticism (in
here, *everybody* gets criticised by the others in various threads,
which helps to discover our mistakes and become better programmers!).






Regards,

Ioannis Vranos
 
M

Momchil Velikov

valentin tihomirov said:
In fact, I yould agree with origianl poster, there is one thing. OOP
programming (dynamic memory allocation) enforced by garbage collection makes
it hard to build real-time systems due to non-deterministic responce times.

Nonsense.

OOP (I think you mean Object-Oriented Programming) is completely
orthogonal to the dynamic memory allocation, as evident from a large
number of non OO C/C++ language programs.

Likewise, garbage collection (or more properly, automatic memory
management) is completely orthogonal to OOP, as evident from the large
number of Lisp/Scheme systems.

Also there's a large number of real-time GC algorithms, although
most real-time systems don't even use dynamic resource allocation.
 
J

JKop

Default User posted:
People, including me, have given you detailed instructions on how to do
so.

I think you are lying and use this as yet another excuse to cause
trouble.



Brian Rodenborn

In Ireland, we have a saying, "blank".

Just blank him.


-JKop
 
T

tom_usenet

Sorry, got cut off there.
Nevertheless, java tools are capable of analyzing code much more smartly
(you'told you use Idea).

C++ tools can do it in theory, it's just that no one has written a
good one yet (Eclipse tries...). It is of course much harder to do
than for Java, and would require a well optimized C++ parser and
analyser to give acceptable performance.

I think there are a number of sourceforge projects working along these
lines.
Yes, but in systems which relay their error handling on exceptions (which
ensure you do not forget to handle the error) the finally clause is a-must.

Not at all - C++ doesn't have it, and instead has the superior
alternative of destructors.
It it needed for programmers not to forget to deallocate resources.

It doesn't help the not forget, and that's its main problem.
In C, most dynamic resources are allocated on the stack, exceptions are
rarely used. Not surprisingly, that C++ experts are not aware about this
critical feature.
"critical"!?

In OOP, objects are typically allocated dynamically on the
heap;

I don't think that's a property of OOP as such, rather languages like
Java and Smalltalk.
http://dictionary.reference.com/search?q=object-oriented programming

therefore,
resourceObject = new Object();
try
use(recource)
fianlly
resource.free();
end;
is written as a prayer.

Yes, sadly that has become a common means of resource management. It's
just as error prone as C's explicit memory management.
In C++ where objects are created on the stack, it is less topical issue.

And, crucially, stack based proxies are used for heap based objects.
Hardly this feature will make programs more reliable.

I don't see that it affects reliability either way. But it makes
programs that use it quicker to develop, particularly when combined
with generic programmming or pre-built libraries. Isn't that your main
argument for using Java? Java even admits that it's a good thing, with
its String + Object/built-in hack.

Now think of a language where it's possible to mimic java's String
interface without special compiler support. Yup, that's C++ (among
others).
Should we pull
properties and indexers from Delphi? I don't know.

Properties would be quite useful in C++ for generic programming if
nothing else, but the language is powerful enough to allow simulation
of properties using templates and operator overloading. Java and C++
can certainly do without them though.
Lately, the same desire visits me. I have a similar vision on the lang of
my dream. And when I think about it, "D" always comes to the mind.

http://www.digitalmars.com/d/index.html
Sadly, not as good as it could be, at least not yet.

Tom
 
D

Default User

JKop said:
Default User posted:


In Ireland, we have a saying, "blank".

Just blank him.


Trollsdale it too dangerous to ignore, unfortunately. If he were just
one of the annoying attack dogs or something, then he'd have been
killfile meat a long time ago.

But he's not. He has some knowledge of the subject and perverse desire
to spread disinformation about it.



Brian Rodenborn
 
D

Default User

<[email protected]> <[email protected]> <[email protected]> <[email protected]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Your comments have been noted -- I'll review my prior comments and make the
appropriate changes.


Ok, sounds good. Understand at no time was I trying to be nasty. It's
one of those deals where if we sat next to each other in the cube farm
or something, we could have gone over it with a diagram and a story and
all would have been clear. But instead we're communicating through the
written word in posts separated by time and space, so we do the best we
can.

I know from your posts here that you definitely try to be helpful and
have a genuine interest in "getting it right". We all also have the
human compulsion to be right, even when the evidence starts to stack up
against us. Believe me, I've been there.




Brian Rodenborn
 
D

Default User

Ioannis said:
I think you are facing what I faced the first time I joined another
programming language Usenet group. The group is highly technical and its
casual users strict in accuracy.


Most people go through that sort of thing. I first accessed comp.lang.c
as the local "C expert". Boy oh boy, did I quickly find out how much I
didn't know. And how much of what I did know was wrong, incomplete,
platform specific or just kind of hazy.

They sharpened me up, and I'm a better programmer for it.




Brian Rodenborn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top