Posts: 429
Threads: 117
Joined: Jul 2014
Reputation:
18
10-01-2014, 02:54 PM
(This post was last modified: 10-16-2024, 05:44 PM by Konloch.)
What do you guys think of them? Personally they're pretty useless in my opinion.
2024 EDIT: I've now revised my opinion, as one does. Lambda's are great! Long live lambda's!
Posts: 105
Threads: 4
Joined: Sep 2014
Reputation:
12
exactly the same makes code more confusing
Posts: 105
Threads: 4
Joined: Sep 2014
Reputation:
12
hows that more readable
if ur not in an ide, say on github you have to find the method the lambda is standing in for... and thats way harder to read
Posts: 12
Threads: 2
Joined: Jan 2015
Reputation:
5
01-05-2015, 07:13 AM
(This post was last modified: 01-05-2015, 07:15 AM by DarkStorm.)
Alright, I'm going to go ahead and reply to a post of decent age, so apologies in advance.
Java as a programming language has been losing a decent amount of traction against newer languages with features pulled from newer-ish areas of CS language theory and other languages that are just quicker to write code in. I suspect that Java architects forsee this as having potential for snowballing if Java isn't kept at least somewhat refreshed so often. (Aside from generics in 1.5, the language really hasn't seen much change for the everyday programmer pre-1.8.)
With all that said, I think introducing basic functional programming constructs is great progress! Yes, lambdas are just syntactical sugar that compile to anonymous classes; yes, streams can be done via for loops; and yes, none of these things are "new" in a programming language. But the each of these things combine and give way to a paradigm that makes writing such transformation operations significantly less cumbersome. There are many cases where I have averted designing APIs with single-function anonymous classes specifically because they require(d) a stupid amount of boilerplate. I pretty strongly believe that language syntax should not have to be a deciding factor in the development of software, especially if you consider a language as a tool for the programmer to express his/her ideas.
Whenever you think about Java criticism (besides the ridiculously unfounded/antiquated notion of slowness that came out of the ass of the native camp in the 90s), you'll almost always see the boilerplate and language age mentioned. In my experience, those have been some of the largest reasons for new programmers to shy away and toward newer, shinier languages. A new paradigm that simplifies common operations syntactically and semantically is something Java really was in dire need for.