What's bad in Java

A

Andrew Thompson

I hope the next release will address these concerns.

What is it, fag season?

"Bobby-jim, fetch the guns - and wake up the conceivable
trackin' gobbler, these critters are wily."

--
Dave T.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"We need an energy bill that encourages consumption."

--- Adolph Bush,
Trenton, N.J., Sept. 23, 2002

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is just a reminder.
It is not an emergency yet.
Were it actual emergency, you wouldn't be able to read this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
D

Daniel Pitts

Jack said:
Lew a écrit :
Jack said:
The guy who will say to me that using the Java ArrayList<Integer> is
as fast as using int[] in C is a liar. I just don't understand why
people

i was expressing some facts : average Java applications uses so called
high level data structure wich have a high overload cost in memory and CPU.
High is a relative term, and I think you meant overhead, not overload.
In any case, Java is a High Level Language, it is designed to work well
with "high level data structures" and abstractions. It does cost "more"
in CPU and Memory than doing the same in, say, assembly, but the total
cost (including engineering time and maintenance) is far less than on
low level languages. Even C++ programs tend to have a higher engineering
overhead.
Apples and oranges. What about comparing int [] ops in Java vs. C?

For similar operations in real-world applications, Java is generally
about as fast as C for most things. It's not really worth arguing
here; such discussions rarely work from fact or resolve in Usenet.
Let those who care review the evidence.

Note that I do not claim that Java is quite as fast as C, nor that it
applies across the board to all use cases. Furthermore, having used
both C and C++ myself for some years, I remain convinced that
different tools work better for different jobs. Java is not the
perfect language.

Well i agree, but this assumption would make Java a student-assignment
language, not a highly responsive desktop application.
What? I've seen some VERY well written and highly responsive desktop
applications, despite the fact that Java's focus has shifted to
server-side and enterprise technology.
Ok so now you are the trolling guy since, like always, every single
arguments i give is cut and rejected. My point is that when you start an
average Java application, it's less reactive, or slower, than an average
C application. If you compare Notepad with the Java demo which is in the
JDK (i believe), you see it right away.
Actually, trolling is rejecting a well thought-out argument because "its
dumb". What Lew is doing is providing counter examples to your claims.
You want rational point, but you won't listen to them, you just won't
admit them, you want to fight the evidence.
You haven't made any rational points. You've summarized what points
you'd like to make, but haven't proven or explained them.
I know Java is not the perfect language, but it sacrifices too much of
speed for easiness, from my work experience.
Perhaps you chose the wrong language for your work. If you need to
drain every last cycle out of your CPU, then write in assembly.

For the other 99% of applications, Java works just fine.
I won't talk about memory, i [sic] think it's obvious.

You think what's obvious? Your earlier post said that Java wouldn't
let you free memory when you were done with it. That is not accurate;
Java most certainly does let that happen. If you have another point
about memory, please let us know what it is.

You seems to make a difference now, between "let that happen" and "let
you make it happen". I mean, in C, i can release memory when i want to.
Yeah, in C, you have to keep track and make sure you release it when you
need to.

Again, if you need to keep strict control of your memory usage, and
you're finding Java doesn't do that, then you've chosen the wrong
language. Most applications need a "pool" of memory that can grow and
shrink over time, depending on current demand. Java abstracts that away
from the programmer altogether. Yes, you give up some control, but you
also give up a LOT of worry.
Anyway, if somebody can give me hint on a programming language which
fixes the listed problems, well i would be glad.
Java.
And my last point will be that some language (like C# i [sic] think)
offers a solution to some points (the accessors), so i [sic] think
i'm [sic[ not the only one to find writing accessors dumb.

What does "dumb" mean?

Do i need to find the exact word to make my point ?
Actually, that's considered the crux of a good argument. Yes. You do
need to find the words to make your point.
Don't you have
yourself any grief against writing "mutators", with self Javadocs, and
with one dummy statement ? I mean, haven't you find yourself writing
them and thinking, what a dumb think to do, but you have to, since all
the dev team do it...

Its called the uniform access principle.
<http://en.wikipedia.org/wiki/Uniform_access_principle>

I personally would like a more succinct syntax to create accessors and
mutators. However, even when I code in C++, I don't access the C++
equivalent of fields directly.
Take a car and push it, if you don't like the oil industry. Using half
the language means:
1/ You code alone
2/ You use the wrong language
Indeed. Although thats a straw-man argument:
<http://en.wikipedia.org/wiki/Straw_man>

If you choose another language altogether, you still are coding along,
and using the wrong language :)
Unspoken is true, but i wanted to avoid "i think that" followed by "not
me". I'm pretty sure you may find drawbacks too, but you want me to list
them precisely, which i won't.
If you don't list the drawbacks, you'll find that it'll be replaced by
an idiom with the same or worse drawbacks. Don't state a problem, state
a solution.
Every rational thought call another rational thought wich claim the
opposite, so i won't do it again (like for the Java slowness point). I
just feel that Java application are slower, in average. I might start a
thesis, putting some time measure on 5 Java application, and 5 C
application, but it would be useless since it's obvious.
Windows Vista is much slower than Dos 5.0. Does that mean that Vista is
dumb? Okay, bad example, and also a Strawman, but I think you might be
able to get my point.
Anyway, thank you for answering. But it seems we won't agree on anything.
I believe Lew is more concerned by your editorial voice and the lack of
substance in your post than your actual (if not yet fully stated)
arguments.

To reiterate. You may have some good points, but you have yet to make them.
 
J

Jack

Daniel Pitts a écrit :
Jack said:
Lew a écrit :
Jack wrote:
The guy who will say to me that using the Java ArrayList<Integer> is
as fast as using int[] in C is a liar. I just don't understand why
people

i was expressing some facts : average Java applications uses so called
high level data structure wich have a high overload cost in memory and
CPU.
High is a relative term, and I think you meant overhead, not overload.
In any case, Java is a High Level Language, it is designed to work well
with "high level data structures" and abstractions. It does cost "more"
in CPU and Memory than doing the same in, say, assembly, but the total
cost (including engineering time and maintenance) is far less than on
low level languages. Even C++ programs tend to have a higher engineering
overhead.

yes, but every time i need a lower level control of memory, which is in
2 or 5 percents of use cases, i think that opening the language in some
way to low level, these few use cases would be handled good. And these 2
or 5 percents are generally these which need to be optimized.

Apples and oranges. What about comparing int [] ops in Java vs. C?

For similar operations in real-world applications, Java is generally
about as fast as C for most things. It's not really worth arguing
here; such discussions rarely work from fact or resolve in Usenet.
Let those who care review the evidence.

Note that I do not claim that Java is quite as fast as C, nor that it
applies across the board to all use cases. Furthermore, having used
both C and C++ myself for some years, I remain convinced that
different tools work better for different jobs. Java is not the
perfect language.

Well i agree, but this assumption would make Java a student-assignment
language, not a highly responsive desktop application.
What? I've seen some VERY well written and highly responsive desktop
applications, despite the fact that Java's focus has shifted to
server-side and enterprise technology.

Well you can't. The starting of the jvm is a major drawback for any java
desktop software. And then Swing is pretty slow anyway. I don't say that
if you spent 1 week on each dialog with a profiler, and with "acid test"
data, you can't fix them, but it's just too much effort, wich are not
needed in win32 C API for example. I'm talking about speed, and don't
say that a DefaultListModel is easier to use than a callback function.

Actually, trolling is rejecting a well thought-out argument because "its
dumb". What Lew is doing is providing counter examples to your claims.

Not really.
You haven't made any rational points. You've summarized what points
you'd like to make, but haven't proven or explained them.

I can't prove anything to you because i don't have a measures. I just
just Java app every day, and each time i switch to a big C app, like
Word, or any Office, i find them a lot more "fluid" than any Java app
i've used.
Perhaps you chose the wrong language for your work. If you need to
drain every last cycle out of your CPU, then write in assembly.

For the other 99% of applications, Java works just fine.

Where does the 99 come from ?
I won't talk about memory, i [sic] think it's obvious.

You think what's obvious? Your earlier post said that Java wouldn't
let you free memory when you were done with it. That is not
accurate; Java most certainly does let that happen. If you have
another point about memory, please let us know what it is.

You seems to make a difference now, between "let that happen" and "let
you make it happen". I mean, in C, i can release memory when i want to.
Yeah, in C, you have to keep track and make sure you release it when you
need to.

Again, if you need to keep strict control of your memory usage, and
you're finding Java doesn't do that, then you've chosen the wrong
language. Most applications need a "pool" of memory that can grow and
shrink over time, depending on current demand. Java abstracts that away
from the programmer altogether. Yes, you give up some control, but you
also give up a LOT of worry.

Well there must be some 50/50 method to handle memory.
Anyway, if somebody can give me hint on a programming language which
fixes the listed problems, well i would be glad.

Java.
And my last point will be that some language (like C# i [sic] think)
offers a solution to some points (the accessors), so i [sic] think
i'm [sic[ not the only one to find writing accessors dumb.

What does "dumb" mean?

Do i need to find the exact word to make my point ?
Actually, that's considered the crux of a good argument. Yes. You do
need to find the words to make your point.
Don't you have yourself any grief against writing "mutators", with
self Javadocs, and with one dummy statement ? I mean, haven't you find
yourself writing them and thinking, what a dumb think to do, but you
have to, since all the dev team do it...

Its called the uniform access principle.
<http://en.wikipedia.org/wiki/Uniform_access_principle>

I personally would like a more succinct syntax to create accessors and
mutators. However, even when I code in C++, I don't access the C++
equivalent of fields directly.

You seems to agree.
Indeed. Although thats a straw-man argument:
<http://en.wikipedia.org/wiki/Straw_man>

Thanks, you page made me smile.
If you choose another language altogether, you still are coding along,
and using the wrong language :)
If you don't list the drawbacks, you'll find that it'll be replaced by
an idiom with the same or worse drawbacks. Don't state a problem, state
a solution.

No because i don't need a solution. I would like a new Java without
these problems.
Windows Vista is much slower than Dos 5.0. Does that mean that Vista is
dumb? Okay, bad example, and also a Strawman, but I think you might be
able to get my point.

You are exactly right. Vista is dumb because it tries to do too much,
and is too slow, for an operating system. The metaphore is excellent.

I get your point but i have a different perspective. I see it in term of
cost: more CPU for more features, but i see it in term of needs, and so
i see a lot of unneeded "dumb" stuff in Vista or Java.
I believe Lew is more concerned by your editorial voice and the lack of
substance in your post than your actual (if not yet fully stated)
arguments.

Well i thank Lew for his reading, but i disagree with him.
To reiterate. You may have some good points, but you have yet to make them.

That would start a troll, so i won't. I was hopping to see another guy
who would have said "i agree with you, i've changed from Java to this
better but unknow language called XXX 5 years ago".
 
J

Jack

Kenneth P. Turvey a écrit :
There is a bug report at Sun to allow for generics to specialize on
primitive types. There are also any number of bug reports related to
performance of arrays and such.

This one from august 2001 ?
http://bugs.sun.com/view_bug.do?bug_id=4487555
You really should go there and get a login if you want to direct the
language in a given direction. You get three votes to put against the
bug reports and feature requests. Allocate them to the features you
think are most important and let Sun know how you feel.

Yeah, if you help me find the bugs.
 
A

Andrew Thompson

I hope the next release will address these concerns.

What is it, pooper season?

"Bobby-jim, fetch the guns - and wake up the detrimental
trackin' Divinity, these critters are wily."

--
Simon T.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"We need a Class bill that apologizes consumption."

--- Adolph Petroff,
Trenton, N.J., Sept. 23, 2002

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is just a thunder.
It is not a modification yet.
Were it autocratic problem, you wouldn't be able to read this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
C

Chronic Philharmonic

Jack said:
. Java programs are slower (Swing and JVM)
. Swing layouts are not efficient to get desired result

I have no problem with them. See
http://mysite.verizon.net/Karl_Uppiano/wxservice.html (WxMonitor).
. There is a memory footprint overhead (compared to primitive sizes)

I assume you mean the JVM layer to convert the Java byte code to machine
code. All told, the management stuff you have to hand-code manually and
repeatedly in native code vs. done once in the JVM, I'm not sure you can
make that claim.
. The GC freezes the application from time to time

You know, I have never been aware of it in years of using Java UI
applications. And my real-time weather data acquisition server doesn't seem
to suffer from GC. See http://mysite.verizon.net/Karl_Uppiano/wxservice.html
(WxService).
. It's impossible to add a method to a JDK class

Only if the class is declared final. Only some are, for specific engineering
reasons.
. The difference between checked and unchecked exception

What about it? My only gripe is that InterruptedException is checked. I wish
it was unchecked. The vast majority of the rest seem fine to me.
. Collections class are badly designed, they try to do too much

It has never been a big gripe of mine, but here's an opportunity to code and
market an alternative package, and make lots of money.
. Starting thread is easy but synchronizing results in the GUI is harder

I follow the Swing threading guidelines, us invokeNow and invokeLater, and I
have no problems.
. Having to code methods to access fields is dumb, it should be
"transparent"

You mean like C#? NetBeans 6.0.1 generates field accessor methods
automatically.
. The JDK gives access to a ridiculously small part of an OS features

It gives common access to the LCD of all OS features, with JNI to write
custom access to specialized features.
. It's not possible to free memory when i'm sure i wont use it again

You mean reference counting? Yeah, that's an activity I miss in Java -- NOT!
GC does that for me, and I really haven't missed it.
I hope the next release will address these concerns.

I hope it doesn't.
 
E

EJP

John said:
EJP a écrit :
Well, let's take a HasMap of Integer (key and value)

Then you're not talking about primitive types any more, you're talking
about the wrapper types, which add a lot of value which you aren't
accounting for.
I'm not talking about a general way, i just wish to see an intrusive way

I don't understand the difference, and I also don't understand why you
would want the feature. That means you have to ship your own JRE with
your application; your app won't work with any other JRE; nobody else's
app can work with your JRE. If you need an extra feature why wouldn't
you put it into your application?
A lot of people complains about that feature.

[i.e. checked exceptions] Not anywhere near me they don't. I suspect a
lot more people thank God for it every day like me. Would you really
prefer the C++ behaviour for example?
They are heavyweighted for my uses, and i think i have standard uses of
them.

[collection classes] Explain, and also tell us what you're comparing
them to. STL?
So explain why a library like "spin" was designed ?

[threading] Because it's not a language issue. If it was a language
issue it would have been impossible to design a library like spin. It's
an API issue if you like, but the Java API is much like all the other
thread APIs I have ever used since 1989.
True, but if you are in a big dev team, you can't act as if you were
alone. I'm talking about generaly admitted best practices.

In other words you're talking about what development teams require, not
about what Java requires. If you don't agree with your development team
requires, take it up with them. Java doesn't require any of this.
If you accept the idea of freeze, it's true.
Eh?

But take a look at bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038
Sun has provided a way to release shared memory because of security
concern, so you are stuck with workarounds to make the GC do it for you.

Err, Sun has *not* provided a way for that, and the workarounds are
dubious too. You are talking about the very specific case of
memory-mapped files here. As a general statement what you said is
untrue. As a statement about mapped files, I agree with you, but it's
not really a Java problem: you are up against design limitations in some
of the target platforms.
 
E

EJP

Mike said:
About 1985 or so, I started (but never had the chance to finish) a
very amusing book ... If anyone recognizes this
description and can name the book, I'd be grateful.

I think that is probably 'Open Systems Networking' by Piscitello and
Lyman Chapin. Full of 'Aha' sidenotes, some very funny indeed. 4
reliable transport layers? ISBN 0201563347.
 
E

EJP

EJP said:
I think that is probably 'Open Systems Networking' by Piscitello and
Lyman Chapin. Full of 'Aha' sidenotes, some very funny indeed. 4
reliable transport layers? ISBN 0201563347.

More probably it was Marshall Rose, 'The Open Book'.
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top