Re:Google confirms next Android won’t implement Oracle's pro...
by meagain20000 on Friday January 01, 2016 @02:51PM
(#10823081)
Got it. One thing that really bothers me is the name lambda. It seems to be used for something I'm already familiar with and have used plenty before but with the added benefit of obfuscation to make me feel stupid. I wonder if somebody is trying to make themselves feel smarter or I'm just stupid. Anyhow, KISS.
Consider, for example, how you'd pass a specialized comparator to a generalized quicksort function. In C, you pass a function pointer to a cmp() function. In Python you just pass a function, because functions are first-class values that you can use like anything else - you can pass it by name, or you can pass a lambda. In Javascript you can do like in Python, or you can declare a full-fledged function anonymously inline. In pre-8 Java, you have to pass a weird object that instantiates a class that has a static method with the right name; this is ugly as shit, but it does WORK. In Java 8 you've got lambdas, so that sucks less.
It's not like you can do anything you couldn't do before. It's just a little less stupid now.