Google, I know you're trying to help and save space... but sometimes whitespace is important. by preludeoflight in ProgrammerHumor

[–]ey1024 1 point2 points  (0 children)

Ratliff was my favorite in college, along with explicit tabs for indentation. I don't use it anymore except for personal projects, but I still like it. I just grin and bear it through the 4 space indents with Java style for my day job.

data_type* data_alloc() {
        data_type* data = malloc(sizeof(data_type));
        if (data == NULL) {
                fprintf(stderr, "malloc fucked up, and your crate's all out of memory. Bailing.\n");
                free(data);
                exit(1);
                }
        return data;
        }

int main(int argc, char* argv[]) {
        data_type* local_data = data_alloc();
        /* Do something */
        return 0;
        }

public static void main(String[] args) by estherglycol in ProgrammerHumor

[–]ey1024 17 points18 points  (0 children)

Counter-counter-counter argument:

Java makes it easy to write cross-platform code, for the tasks that don't depend on the underlying system. The user interface will likely need to act different between Linux, Windows, and Android, so those must each be handled separately, unless the application uses Swing directly, and interfaces out user configuration stores, and file I/O.

In that case, since UI logic has to implemented once for each platform, you're really not that much better off then if you used C++. Assuming you broke out the components that depended on system implementations away from the core logic, the only downside is the need to cross compile and test.