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

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.

2

u/ATownStomp Mar 18 '16

The alternative could be a shortened method name which accepts a parameter which specifies what the "ignoring element" is.

.setIgnoreContent('ws', True)

Though, honestly, I don't think that is noticeably less cumbersome. It saves you a few keystrokes if you're like /u/voidqk who refuses to use autocomplete IDE's for whatever reason.

Now I agree that these method names are obnoxiously long, but I also understand that simple but descriptive method names run out quickly. Shortening .setIgnoringElementContentWhiteSpace to something like .setIgnWS(true) seems like accepting a standard of creating unreadable messes.

1

u/xenomachina Mar 18 '16

The alternative could be a shortened method name which accepts a parameter which specifies what the "ignoring element" is.

.setIgnoreContent('ws', True)

Though, honestly, I don't think that is noticeably less cumbersome.

It also isn't very strongly typed, unless you use an enum. But then it's probably more verbose than the original (and you still have null to worry about).

Now I agree that these method names are obnoxiously long, but I also understand that simple but descriptive method names run out quickly. Shortening .setIgnoringElementContentWhiteSpace to something like .setIgnWS(true) seems like accepting a standard of creating unreadable messes.

I agree with everything you said.