by famousactress · 15y ago · 0 comments
New language features are all fun, but unless they actually result in faster execution, or allow you to do things you could not do before, they're only use is to make some developers happy, which I don't think is particularly important.
It looks like there's some real solid good APIs here though which is great to see.
At first thought I imagined it'd just be useless pandering to developers like "You can now do closures or first class functions" or something equally useless.
"You can now do closures or first class functions" or something equally useless.
Flamebait, but I'll take it. I think the dust-up over the possibility of this being added to Java really seemed to contribute to the decline and apparent disinterest of a lot of folks (I'd really be interested in Bob Lee's opinions here, since he was someone who's ideas I was particularly aligned with at the time and has since gone pretty quiet).. That said, lack of first class functions in Java isn't a trifle. It's why Java isn't all that much fun to program in compared to more expressive languages... and a bigger problem is that more than any other language I'm familiar with Java suffers from the problem of not being able to see enough ideas in a given amount of source code. I'm explaining that terribly, but I just mean that Java code is at least 60% scaffolding that isn't material to the author's intent.
Closures, or first class functions done nicely would be a big step in alleviating that issue, IMHO.
This is not an issue with Java. It's an issue with the programmer. How are you going to cope with assembly language listings? Blame assembly language?
I think you don't appreciate how some language features can help you reduce the size and complexity of your code. Those are the kind of features that are sorely lacking in Java, and that means huge, bloated code bases.
I'm tired of visually parsing 20 lines of a Java method and filtering out all the boilerplate iteration junk just to find the one or two lines that actually do something. Often this kind of thing can be reduced to a few simple, relevant lines when you have closures, for example.
No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more.
Disclaimer: I'm an outlier. I rarely use 3rd party libs, rarely write with anyone else, etc.
Actually, let's not. To paraphrase a minor celebrity of programming, life is too long to be good at reading every variation of boilerplate. Java is essentially hostile to small functions and parametrization, as having any semblance of inner or anonymous functions will require you to define a class at least, or an interface somewhere else, scattering your code unnecessarily, and you'll probably just end up repeating the code because it's just not worth the effort to do it. Don't believe me? Why do you always have to .open() and .close() your any port-like thing manually? That's a solved problem, you know?
Also, 'making the difference' and 'being totally irrelevant' are two very different things. Programming languages matter. I'd be surprised if Mr. Spolsky disagrees.
Don't know why you are getting down voted. Even Joel Spolsky says that what really makes the difference is the programmer, not the language. If you suck in Java you will probably suck in other languages.
Congratulations, you've found your Blub. (Mine is Python; I'm still not clear on what monads would do for me in practice).