Hacker News new | ask | show | jobs
by jrockway 5461 days ago
Java and C++ are designed for serious work. In these, you take types, error checking and exceptions seriously, you keep the code clean and robust, and you R the FM thoroughly for every single external function you call.

What type is "null" in Java? What type is the stack in C++?

Java and C++ have very little typing. You have to type a lot of types into your source code, but they don't get you anything. For every Java or C++ program, there is some set of input that results in a NullPointerException or a segmentation fault. Guess what: if you had a type system, that wouldn't happen.

Java and C++ are designed for certifications, long-lasting career, and compiling [1].

[1] http://xkcd.com/303/

2 comments

Completely agree with the types part. I did not try to say that Java or C++ are strictly typed, but that the types (ie. classes) that are used in programs are taken seriously. By this I mean that if you are looked down by serious C++ developers upon if you send your references via void pointers or typecast by guessing.
> What type is "null" in Java?

    String
> What type is the stack in C++?

    struct Stack;  // No definition

    Stack *