|
I'm not arguing that people are too stupid to understand closures In that case why did you state so?
So because Java has been "a handy and effective language", there is no room for improvement? No, you're putting words in peoples' mouths. Stating that there's no room for closures or operator overloading doesn't mean stating that there can't be changes that ARE appropriate...
Who's forcing you to use closures? Is someone forcing you to use annotations? What about generics? Is your manager threatening to fire you if you don't use the new for loop syntax? The person who wrote the code you have to maintain. And yes, my manager would fire me if I didn't maintain the projects I have under my responsibility that use annotations (which I don't care for), generics, new loops, and autoboxing. And he'd have every right to as refusing to do my job is grounds for being fired.
There are a lot of things that closures can do that can't currently be done. For example, if you have an inner class in a for loop, can you break out of the for loop from inside the inner class? No you can't. Can this be done with closures? Yes it can. Which makes for harder to comprehend code, added obfuscation, in other words, isn't beneficial in the least.
Closures are function pointers in disguise, which is NOT something that's suitable for Java or any other language not designed from the ground up to have them. |