The Artima Developer Community
Sponsored Link

Weblogs Forum
What Are Your Java Pain Points, Really?

264 replies on 18 pages. Most recent reply: Jan 17, 2008 7:07 AM by GJ sonke

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 264 replies on 18 pages [ « | 1 ... 4 5 6 7 8 9 10 11 12 ... 18  | » ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Why I don't like Java Posted: Feb 14, 2007 1:59 PM
Reply to this message Reply
Advertisement
> > > to naming files "test1.java" even
> > > though you know it's a test because it's in a
> directory
> > > called "tests."
> >
> > I believe this is a JUnit convention, not a Java
> > convention.
>
> The number 1 (or rather, the character 1) is not a valid
> class name. Since the file is named after the class, I
> can't name the file 1.java. Instead, I have to make it a
> valid class name, say test1.java. Even though the file is
> in a directory called tests, and I already know it's a
> test.
>
> End of the world? Nope; but it's a case of the compiler
> enforcing a rule that's not related to the compiler. It
> might as well refuse to run after 10:00 PM local time
> because that's Just Too Late to be programming.

Name your classes A, B, C... and get on with your life.

Max Lybbert

Posts: 314
Nickname: mlybbert
Registered: Apr, 2005

Re: Why I don't like Java Posted: Feb 14, 2007 2:00 PM
Reply to this message Reply
/* What I'm still not getting is what having access to raw pointers buys you. Why do you need this?
*/

Personally I'm just upset that I have to remember objects are pointers under the cover, but I can't pass them to a function by reference.

However, depending on the interface provided, I suppose I could create a separate garbage collector (or, rather, memory manager) if desired.

Morgan Conrad

Posts: 307
Nickname: miata71
Registered: Mar, 2006

Re: How can we cut down on the Verbosity? Posted: Feb 14, 2007 4:19 PM
Reply to this message Reply
> Unless classes are also Objects, this doesn't really solve
> anything because until you construct the Object, there's
> nothing to provide to someone else.


I guess I was implicitly assuming that something like Spring was serving as your factory. It looks up IInterface, gets MorgansGreatImpl as the preferred implementation, checks that MorgansGreatImpl also implements IMorgansNewStaticInterfaceToDoConstructors, then returns

MorgansGreatImpl.class.newInstance(a, b, c);

Agreed, it's all a bit fuzzy... Somebody else posted a possible fix as well.

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: What Are Your Java Pain Points, Really? Posted: Feb 14, 2007 5:22 PM
Reply to this message Reply
I've been watching this discussion and my conclusion is that nearly every "pain point" somebody has mentioned has either been discounted or disqualified on the basis of it being a "new feature" or something that should be ignored so we can "get on with our lives".

Yes, everybody understands that no language is perfect, but what's the purpose of asking the question (or participating in the discussion) if every complaint is dismissed?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: What Are Your Java Pain Points, Really? Posted: Feb 14, 2007 6:06 PM
Reply to this message Reply
> I've been watching this discussion and my conclusion is
> that nearly every "pain point" somebody has mentioned has
> either been discounted or disqualified on the basis of it
> being a "new feature" or something that should be ignored
> so we can "get on with our lives".

Explain to me why not being able to name a class '1' is a serious pain point and I'll retract my comment about getting on with life.

> Yes, everybody understands that no language is perfect,
> but what's the purpose of asking the question (or
> participating in the discussion) if every complaint is
> dismissed?

Not every complaint has been dismissed. That's a complete misrepresentation of the conversation. But I'm not going to pretend that I don't think that not being able to name a class '1' is a serious issue that must be resolved. Isn't this also a rule in C++?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: How can we cut down on the Verbosity? Posted: Feb 14, 2007 6:13 PM
Reply to this message Reply
> I guess I was implicitly assuming that something like
> Spring was serving as your factory. It looks up
> IInterface, gets MorgansGreatImpl as the preferred
> implementation, checks that MorgansGreatImpl also
> implements IMorgansNewStaticInterfaceToDoConstructors,
> then returns
>
> MorgansGreatImpl.class.newInstance(a, b, c);
>
> Agreed, it's all a bit fuzzy... Somebody else posted a
> possible fix as well.

Well, you can do stuff like this now. You just can't make it part of the interface declaration.

I don't mean that it's a bad idea. I think it's a great idea that highlights why having classes as first class objects would be such a nice feature. I don't hold out much hope for it happening, though.

Really I think it's time to start looking at a replacement. As has been pointed out by Max, the Java language took too many beatings as a child. It's never going to be perfect.

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: What Are Your Java Pain Points, Really? Posted: Feb 14, 2007 6:41 PM
Reply to this message Reply
It wasn't my intent to single you out, James, but don't you think "pain" is inherently subjective and personal? The topic is "What are your java pain points, really?" not "What are the limitations of java that everybody can agree on".

Mitchell Stewart

Posts: 7
Nickname: mstewart
Registered: Jan, 2006

Re: What Are Your Java Pain Points, Really? Posted: Feb 14, 2007 7:40 PM
Reply to this message Reply
I think there's a fine line between "pain point" and "wishful thinking". I think that suggestions that fundamentally alter Java to the point that it is unrecognizable are unfair. Take for instance the suggestion to remove semicolon...or to convert Java to a dynamically typed language. How do you reconcile older Java programs with these kinds of changes?

Also, the original question included the business cost of a pain point. I guess the default cost associated with some of these would be the productivity of the developer. The "pain point" of verbosity would fall under this category. You could even argue that the class file naming would fall under that category, as someone might feel more productive if they could name the class files any which way they want.

One pain point of mine is general installation/upgrade procedures for Java, including the sheer size of it. Not only is this a support headache for customers who do not already have Java, but then to explain to them that they need to download and install a 15MB program just to execute my own program is a little embarrassing. Also, any new updates involve downloading and installing a whole new Java version. Thanks to the new DST laws, nearly all my customers have to download a new version of Java, and the Javas just keep on piling up on the machine. I would love to see a small JVM that is able to download only the base classes it needs to run, and also update itself without needing a completely new install. Oh wait, it's already been proposed as the Java Kernel in Java 7. :)

Another pain point is that it is hard to deploy a new version of a library that is already included in Java without jumping through some hoops to configure the JVM to use the new libraries. Either you place it into a special directory in the JVM (endorsed libs) or you have to configure your app to look for specific libraries to load first. Take for example JAXB 2.0 in Java 6, the JAXB developers have already made several point releases since the initial release of Java 6. In order to get these fixes I have to manually download the library into all my customer's JVMs and configure my app to use that new library, or I have to hope that the fixes will be released in the next update version of Java 6, which brings me back to my first pain point.

Max Lybbert

Posts: 314
Nickname: mlybbert
Registered: Apr, 2005

Re: What Are Your Java Pain Points, Really? Posted: Feb 14, 2007 9:12 PM
Reply to this message Reply
/* Explain to me why not being able to name a class '1' is a serious pain point and I'll retract my comment about getting on with life.
*/

No, it's not the ability to name the class 1; it's the ability to name the file 1 (or, more generally, whatever I want to name it; which may or may not be a class name).

http://gcc.gnu.org/onlinedocs/libstdc++/test.html for instance sets out the naming policy for libstdc++. That policy is not allowed in Java. but nobody can tell me a technical reason for the restriction because there isn't any.

Is it a serious pain point? Not by itself. Unless, you know, you want to name your files according to any convention that hasn't been personally blessed by Gosling, May He Live Forever. And not if you rely on computers to do all your refactoring for you, so they can "cvs remove" any files that are no longer needed because the class they represent is also no longer needed (and cvs remove/cvs add whenever you rename a file).

But you couple that with a few other Gosling Knows Best issues, and well, I stop thinking of it as C++'s replacement and start thinking of it as Visual Basic's replacement.

Mark Williamson

Posts: 14
Nickname: mjw
Registered: Jun, 2003

Re: Why I don't like Java Posted: Feb 15, 2007 12:15 AM
Reply to this message Reply
> Personally I'm just upset that I have to remember objects
> are pointers under the cover, but I can't pass them to a
> function by reference.
>
> However, depending on the interface provided, I suppose I
> could create a separate garbage collector (or, rather,
> memory manager) if desired.

When you use a new language you need to think how the designers want you to - you can use your old concepts to help you find your feet but in the end insisting on thinking of everything in terms of another language you will cause yourself problems.

The java object mechanism works just fine for a broad spectrum for programmers - from people who are so much better than me it takes my breath away , to people who I wonder how they manage to turn on the computer let alone program it. Get your head into the space and it will work out just fine for you 99.9% of the time.

Mark Williamson

Posts: 14
Nickname: mjw
Registered: Jun, 2003

Re: What Are Your Java Pain Points, Really? Posted: Feb 15, 2007 1:19 AM
Reply to this message Reply
>>
> But you couple that with a few other Gosling Knows Best
> issues, and well, I stop thinking of it as C++'s
> replacement and start thinking of it as Visual Basic's
> replacement.

I think that that is a very sensible way to think about Java. It may have learned a lot from C++ but the space it moved into was the VB space by and large. It has saved us from "enterprise" products, hacked together, sorry, coded in VB and given a new level of quality whereby it is possible to build decent application with off the shelf developers. C (and C++) remain useful languages and it could be argued that they are used more appropriately now that Java and the .Net languages exist. C and C++ can do things that Java never will - when memory management is critical or you need to talk to hardware or.. well you get the picture. (although someone showed me a CMS written in C the other day....the mind boggles)

I don't use Java because I am not in its solution space anymore - Our stuff is developed in Python/C and I have a small team of very skilled people. I am very aware that if I need to scale up that team there will be a re-sourcing issue. For people building enterprise apps - they can get Java people pretty easily, there is a base level of doing things in a standard way enforced by Java and it is well understood. You might come along and say "I can write the code better in python/perl/C/etc." but that is only a small part of the puzzle - can you make a whole team write it better in that language, can you cope with staff turnover, is maintenance going to be an issue, are your plans and estimates reliable. Companies will pay more for well understood and reliable development process that may take longer than the 'hotshot' way of doing it but contains far less risk.

Nuwan Goonasekera

Posts: 32
Nickname: nuwang
Registered: Apr, 2006

Re: What Are Your Java Pain Points, Really? Posted: Feb 15, 2007 1:22 AM
Reply to this message Reply
> No, it's not the ability to name the class 1; it's the
> ability to name the file 1 (or, more generally, whatever I
> want to name it; which may or may not be a class name).
>
> http://gcc.gnu.org/onlinedocs/libstdc++/test.html for
> instance sets out the naming policy for libstdc++. That
> policy is not allowed in Java. but nobody can tell me a
> technical reason for the restriction because there isn't
> any.

Well, if you want a technical reason, it is due to the way the JVM locates classes. When you ask the JVM to load a particular class, say using Class.forName(clsName), it will search for the class by its file name. Having a difference between the class name and file name would have made this process unncessarily complicated.

In addition, the issue of quickly being able to locate a class (especially in team environments) has already been mentioned. I think both of these reasons are good enough to impose this restriction.

>
> Is it a serious pain point? Not by itself. Unless, you
> know, you want to name your files according to any
> convention that hasn't been personally blessed by
> Gosling,

I'm not so sure about the soundness of this argument. Ad-hominem attacks against Gosling seem uncalled for. Any language you use requires that you stick to the design rules imposed by the language. Gosling made a concious decision to simplify things in Java, even at the risk of incapacitating it, after observing that what much of the industry needed was a simple language to solve certain classes of problems. There are some things that you just can't do in Java. I believe such decisions are made with the best of intentions, not because the designer wanted to take a vainglorious ego trip.

Similarly, Bjarne Stroustrup made several concious decisions for C++ (i.e. Preserving backward compatibility with C and thereby needlessly complicating the syntax/semantics of the language). In hindsight, many people may criticize that decision, but it was doubtless made with the best of intentions and has its own merits.

Should you design a language, you will doubtless face similar criticism for certain decisions. Therefore, unless there's clear evidence of pig-headedness, go easy ;)

> May He Live Forever. And not if you rely on computers to
> do all your refactoring for you, so they can "cvs remove"
> any files that are no longer needed because the class they
> represent is also no longer needed (and cvs remove/cvs add
> whenever you rename a file).

This is something that ought to be fixed in CVS, not Java. Try SVN instead - where it's not ridiculously complicated to rename a file.

>
> But you couple that with a few other Gosling Knows Best
> issues, and well, I stop thinking of it as C++'s
> replacement and start thinking of it as Visual Basic's
> replacement.

There are certain things that just can't be done in Java. Sun's marketing hype should not to be taken too seriously ;)

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: What Are Your Java Pain Points, Really? Posted: Feb 15, 2007 1:46 AM
Reply to this message Reply
> ...I stop thinking of it as C++'s
> replacement and start thinking of it as Visual Basic's
> replacement.

I didn't realise that Java had ever been intended as anything other than a VB replacement. Well, a B replacement anyway. Ten years later the V part is still leaves a lot to be desired.

Mark Thornton

Posts: 275
Nickname: mthornton
Registered: Oct, 2005

Re: What Are Your Java Pain Points, Really? Posted: Feb 15, 2007 1:51 AM
Reply to this message Reply
> already have Java, but then to explain to them that they
> need to download and install a 15MB program just to
You can reduce that pain slightly by directing them to the online install which usually only downloads about 10MB.

Mark Thornton

Posts: 275
Nickname: mthornton
Registered: Oct, 2005

Re: What Are Your Java Pain Points, Really? Posted: Feb 15, 2007 1:59 AM
Reply to this message Reply
> Well, if you want a technical reason, it is due to the way
> the JVM locates classes. When you ask the JVM to load a
> particular class, say using
> Class.forName(clsName), it will search for
> the class by its file name. Having a difference between
> the class name and file name would have made this process
> unncessarily complicated.

The compiler searches for java source in the same way. Thus if you compile ClassA.java which refers to some other classes (ClassB, etc), then it knows where to look for them and will compile them if their corresponding class files don't exist.

Flat View: This topic has 264 replies on 18 pages [ « | 4  5  6  7  8  9  10  11  12 | » ]
Topic: What Are Your Java Pain Points, Really? Previous Topic   Next Topic Topic: The Future of Online Dialog

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use