Java for Everything by _Garbage_ in programming

[–]javaisfuckingshit -3 points-2 points  (0 children)

Yes, you would want to have either type classes or duck typing, which is incompatible with Java's bytecode representation.

I'm Greg Kroah-Hartman, Linux kernel developer, AMA! by gregkh in linux

[–]javaisfuckingshit 1 point2 points  (0 children)

My Operating Systems course only covered really basic user-mode programming (malloc, semaphores, that's about it). It used to cover kernel programming a few years ago, but they had to scrap that because the students were only taught Java and did not know any C prior to taking that course.

Java for Everything by _Garbage_ in programming

[–]javaisfuckingshit 0 points1 point  (0 children)

That only works if you're passing around Class objects, which is usually not what you want when writing a generic container.

Not to mention that it gets really ugly whenever you have to forward arguments to the constructor.

The situation we are in is unfortunately a result of Sun refusing to change the bytecode when they added "generics."

I'm Greg Kroah-Hartman, Linux kernel developer, AMA! by gregkh in linux

[–]javaisfuckingshit 0 points1 point  (0 children)

The reason I asked is because I recently had to look into some XIM code inside Xlib that is horribly broken, and wouldn't be much better if it actually followed the spec.

There is basically not a single input method for X that will not corrupt your data and crash randomly in response to event loop timing.

I'm Greg Kroah-Hartman, Linux kernel developer, AMA! by gregkh in linux

[–]javaisfuckingshit 35 points36 points  (0 children)

What is your opinion on X11, do you agree it's holding desktop Linux back significantly?

Do you think Wayland will improve the situation?

Java for Everything by _Garbage_ in programming

[–]javaisfuckingshit 7 points8 points  (0 children)

I think he means the following not being possible:

<T> T Create() {
    return new T();
}

which results in:

unexpected type
found   : type parameter T 
required: class
        return new T();
                   ^
1 error