Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why id Java the best language around?

Name: Anonymous 2013-05-18 2:19

I can't quite explain why it is, but it just is. I dare you to refute this claim.

Name: fuckin line chopping 2013-05-18 4:59

1. Java has no built in macro system. It is not possible to implement something as simple as an assertion statement that displays the false expression on an error.
2. Exceptions are the normal style in Java, resulting in complex and inefficient code that frequently unwinds and reconstructs the stack.
3. Java does not have first class functions. However, they may be emulated with anonymous classes, at the cost of being more verbose and harder to read. The need to define an object that implements a method with a particular name makes it more difficult to write a library for higher order functions.
4. It is not possible to define a function within a function. However, it is possible to define a class within a function, and the class may have methods. There is no advantage to disallowing one while allowing the other, save for making it more verbose.
5. The Object interface provided by all objects provides methods for equality and hash code, but does not provide methods for comparison. Alternative interfaces for comparable objects are ugly or incompatible, making ordered data structures harder to use.
6. All methods for a class must be defined within the class body, which can produce very large files if the class has many methods.
7. Lexically scoped classes may develop large definitions, producing enormous source files. They are also hard to divorce from their outer class definition, making it difficult to share code between other such child classes. The real solution is to do away with the lexically scoped definition, but programmers will take the immediately easier solution of copying and pasting code, resulting in large bodies of duplicate code in multiple files.
8. The Java runtime is known for being insecure. Java is now owned by patent troll, Oracle, which creates anxiety about any investment whatsoever in the language. It also doesn't help that they don't plan on fixing the security issues.
9. Package names following the pattern of com.example.www are unnecessarily verbose. Name collisions between packages are rare, and can be resolved easily enough via other means.
10. Tail recursion is not supported, and made impossible by the design of the virtual machine. This is particularly annoying, since tail recursion blends so well with the object oriented notion of the call to the super class.
11. The compiler signals too many false positive errors. Floats need to be explicitly casted to int. Errors about unreachable code will prevent you from compiling and testing code that is still a work in progress.
12. Forcing the programmer to type "public static final" may be negative reinforcement to defining global variables, but it does not remove global variables or provide the programmer with another way to solve their problem.
13. In general, Java strives to find the most verbose representation for everything.
14. Java claims to be more memory secure than alternatives like C++, but this is made invalid by its insecure supporting libraries. It also doesn't matter how memory secure your application is if it still dies from a NullPointerException.
15. The object model is weak and inexpressive. The lack of multiple inheritance makes combining functionality from multiple classes more difficult.
16. APIs may require objects to implement an excessive amount of interfaces and method names in interfaces may collide.
17. APIs are encouraged to make excessive use of design patterns that offer little to no benefit, other than making the library more inefficient and harder to learn.
18. Local variables referenced in lexically scoped anonymous classes must be declared final, which means they can't be changed in loops. This would be fine, but there is no tail recursion, so these variables can't be efficiently used for iteration.
19. Parameterized types in generics cannot always be statically verified, and depend on run time checks that may through exceptions and crash your program.
20. All methods are virtual by default, which produces more inefficient code if not optimized. Every method being virtual makes escape analysis almost impossible to perform locally, since every method call could invoke unknown code.
21. Java code tends to be imperative, which can become difficult to follow as the relationships between objects becomes complex. Java's verbose style makes poorly written code more difficult to read.
22. It is not possible to express packed data structures in Java. Objects must use references to link to other objects, resulting in wasted space and cache incoherent memory look ups, and also more work for the garbage collector.
23. Java is essentially child-proofed C++ with garbage collection. It sacrifices performance while not providing more expressive power. It's a version of C++ for lesser skilled programmers.

Name: Anonymous 2013-05-18 16:53

>>4
>1. Not possible...assertion statement...false expression as an error
So? Just say if (!expectedResult) { System.out.println(expectedResult); throw new Exception(); }
>2. complex and inefficient code
That's an interesting way of saying "I never took the time to understand how coding in Java actually works."
>3. The design of Java makes first-class functions completely unnecessary. Once again, you should actually learn how Java code works.
>4. Function within a function
Why the hell would you need that?
>5. ugly or incompatible
In what way?
>6. Must be defined within the class body
So? Where else would you need to define them? If you put them anywhere besides the class body that would just make everything all the more "complex and inefficient."
>7. enormous source files
Really? It's 2013 and file size for source code is an issue?
>8. insecure
I'll give you this one.
>9. unnecessarily verbose
You see, Java has the best IDEs of any language. Just fucking use Eclipse and you'll never have to type an import statement again. People always complain about Java's excessive boilerplate code but the truth is you almost never have to type any of it.
>10. tail recursion is not supported
Alright, you have 2 points now.
>11. need to be explicitly casted
Casting in Java is not nearly as bad as languages like Haskell. Java makes it completely straightforward.
>11. unreachable code bla bla bla
Ever heard of commenting out code?
>12. bla bla bla
Not a very significant issue
>13. most verbose
Best IDEs.
>14. dies from a NullPointerException
Not if you catch and handle the exception like a normal person. Or just say if (myObject!=null) { //do stuff }
>15. combining functionality from multiple classes
You really don't understand Java's design, do you?
>16. method names...may collide
What are you doing where you need two different interfaces with the same method names and parameters?
>17. Java's design patterns make code much more flexible/easier to change. While it requires a lot of setup, it makes it much easier to change one piece of code without consequentially affecting something unrelated.
>18. bla bla bla
Alright, you have 4 points now. It's still a fairly insignificant point, seeing how sparingly anonymous classes are actually used.
>19. blablabla
Seriously, are you really that bad at coding? Maybe if you actually planned your code out before typing it then you wouldn't have so many problems with exceptions.
>20. all methods are virtual
Most of the time methods will need to be virtual in Java anyway. What if you had to declare every method you wanted to override as virtual? And this is coming from the guy who complains about verbosity...
>21. relationships between objects become complex
Seriously, Java has the most straightforward object system. Come back when you actually learn how it works.
>22. wasted space
>2013
>Is worried about running out of memory
>wtf?
>23. a version of C++ for lesser skilled programmers
More like a version of C++ for people that want an infinitude of libraries, including bindings of C++ libraries, and access to the best IDEs around. Not to mention how fucking simple the syntax is. Also, the standards for class naming/field naming are actually ENGLISH. Unlike C++'s hsgFloatvk num3k = 4.00000. Go to church, kike.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List