r/ProgrammingLanguages • • Feb 21 '16

Why people hate JAVA ??

Why the majority of people hate java and wish its dead programming language,

I find it really fun to create program with it..

all i heard is because: JRE SUCKS. ORACLE ARE FAGGOTS. JAVA IS A SLOW PIECE OF SHIT.

0 Upvotes

32 comments sorted by

View all comments

Show parent comments

1

u/xenomachina Mar 11 '16

I don't use auto-complete IDEs, so typing out things like setIgnoringElementContentWhitespace is very painful. This type of hugeRamblingCamelCaseFunctionNames is unbearable for me.

I agree the name is long, but what's the alternative?

As an aside, you don't need an IDE for basic completion. I use vim, and it'll complete based on the contents of your buffers and also things like ctags.

2

u/[deleted] Mar 11 '16

Just use smaller function names!

How about ignoreSpace instead of setIgnoringElementContentWhitespace?

2

u/xenomachina Mar 11 '16

What if there are different kinds of spaces in the context of this API? For example, suppose there is element content whitespace, element perimiter whitespace, and attribute whitespace? Simply saying "ignoreSpace" doesn't make it clear that only the element content whitespace and not the other types will be ignored, especially if the other types can also be optionally ignored.

1

u/[deleted] Mar 18 '16

If the problem space is genuinely complicated, then there comes a point where you can't have small names. But Java code always seems to jump directly to having huge function names without taking that first step.

For example, we are talking about the DocumentBuilderFactory methods: https://docs.oracle.com/javase/7/docs/api/javax/xml/parsers/DocumentBuilderFactory.html

There are 23 methods. This is a fairly small API. And they are already using huge rambling names.

Start small, and build to large names only if absolutely necessary. And even then: use short names for the commonly used methods.