Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "lambda expressions"
Aren't lambda expressions just the most frustrating thing sometimes? But how can you not love them when they get the job done in one-liners? 😍2
I absolutely love Lambda expressions.
Except for when I didn't write them myself or they are not commented.
Everyone talks about their hate of js but like python is honestly just as bad.
- shitty package manager,
* need to recreate python environments to keep workflows seperate as oppose to just mapping dependencies like in maven, npm, cargo, go-get
* Can't fix python version number to project I.e specify it in requirements
- dynamic typing that gets fixed with shitty duck typing too many times
- no first class functions
- limited lambda expressions
- def def def
- overly archaic error messages, rarely have I gotten a good error message and didn't have to dive into package code to figure it out
- people still use 2.7 ... Honestly I blame the difficulty of changing versions for this. It's just not trivial to even specify another python version
- inconsistent import system. When in module use . When outside don't.
- SLOW so SLOW
- BLOCKING making things concurrent has only recently got easier, but it still needs lots of work. Like it would be nice to do
Or just running asynchronous functions on the global scope will make it know to go to some default runtime. Or heck. Just let me run it like that...
- private methods aren't really private. They just hide them in intelisense but you can still override them....
I know my username is ironic :P13
The senior dev in my team wants me to convert all the lambda expressions I have written to anonymous inner classes. He says it will increase the code readability.
IT IS NOT MY FAULT THAT YOU CAN'T READ LAMDA EXPRESSIONS!!!!
It's like the dev has something against the new features of Java89
Clicks "Exploitation and Enumeration" category.
Clicks "Python (HARD)" challenge.
"What is a key that passes the code?"
Opens Python file and sees one line of nested lambda expressions spanning 1,846 characters (no spaces)
Dear lord! Why is it so hard to get this to work! Anyone know if its even possible to run lambda expression on JSP? I made sure everything is running on Java JDK 8. BUT IT DOESN'T WORKKKKK. I keep getting "Lambda expressions are allowed only at source level 1.8 or above"2
I just realized it'll take years for Java to catch the way C# implemented lambda expressions.
And really devrant? one rant per 2 hours?2
man... fuck java's approach to lambda expressions and like passing functions as arguments and the lot.
it's honestly just so terribly bad. it's sucks so much.26
TL:DR: Unclear requirements led to a complete code rework
Background: We (2 friends, both already work as developers beside studying, and myself) are in a course about multi core programming for Java. We got an simple assignment which we were about to finish today.
An other friend of us is also in this course and asked if he could use some special method which is far above the taught material. He got a email with the following answer: "You are free to use any features of java 8 apart from lambdas and concurrents as we use them for our next assignment." He told us as he couldn't believe that we weren't allowed to use lambdas an we sat in front of our codebase and the only thing we could think of was "fuck".
Our entire code base was filled with lambda expressions as the requirement paper didn't mention any restrictions apart from using java 8.
FUCKING FUCKTARDS GET YOUR REQUIREMENTS RIGHT AND SAY WHAT YOU DON'T WANT TO SEE.
And here I am, sitting in front of intellij and merging my lambda filled fixing branch with our now lambda free working branch.2
Sydochen has posted a rant where he is nt really sure why people hate Java, and I decided to publicly post my explanation of this phenomenon, please, from my point of view.
So there is this quite large domain, on which one or two academical studies are built, such as business informatics and applied system engineering which I find extremely interesting and fun, that is called, ironically, SAD. And then there are videos on youtube, by programmers who just can't settle the fuck down. Those videos I am talking about are rants about OOP in general, which, as we all know, is a huge part of studies in the aforementioned domain. What these people are even talking about?
Absolutely obvious, there is no sense in making a software in a linear pattern. Since Bikelsoft has conveniently patched consumers up with GUI based software, the core concept of which is EDP (event driven programming or alternatively, at least OS events queue-ing), the completely functional, linear approach in such environment does not make much sense in terms of the maintainability of the software. Uhm, raise your hand if you ever tried to linearly build a complex GUI system in a single function call on GTK, which does allow you to disregard any responsibility separation pattern of SAD, such as long loved MVC...
Additionally, OOP is mandatory in business because it does allow us to mount abstraction levels and encapsulate actual dataflow behind them, which, of course, lowers the costs of the development.
What happy programmers are talking about usually is the complexity of the task of doing the OOP right in the sense of an overflow of straight composition classes (that do nothing but forward data from lower to upper abstraction levels and vice versa) and the situation of responsibility chain break (this is when a class from lower level directly!! notifies a class of a higher level about something ignoring the fact that there is a chain of other classes between them). And that's it. These guys also do vouch for functional programming, and it's a completely different argument, and there is no reason not to do it in algorithmical, implementational part of the project, of course, but yeah...
So where does Java kick in you think?
Well, guess what language popularized programming in general and OOP in particular. Java is doing a lot of things in a modern way. Of course, if it's 1995 outside *lenny face*. Yeah, fuck AOT, fuck memory management responsibility, all to the maximum towards solving the real applicative tasks.
Have you ever tried to learn to apply Text Watchers in Android with Java? Then you know about inline overloading and inline abstract class implementation. This is not right. This reduces readability and reusability.
Have you ever used Volley on Android? Newbies to Android programming surely should have. Quite verbose boilerplate in google docs, huh?
Have you seen intents? The Android API is, little said, messy with all the support libs and Context class ancestors. Remember how many times the language has helped you to properly orient in all of this hierarchy, when overloading method declaration requires you to use 2 lines instead of 1. Too verbose, too hesitant, distracting - that's what the lang and the api is. Fucking toString() is hilarious. Reference comparison is unintuitive. Obviously poor practices are not banned. Ancient tools. Import hell. Slow evolution.
C# has ripped Java off like an utter cunt, yet it's a piece of cake to maintain a solid patternization and structure, and keep your code clean and readable. Yet, Cs6 already was okay featuring optionally nullable fields and safe optional dereferencing, while we get finally get lambda expressions in J8, in 20-fucking-14.
Java did good back then, but when we joke about dumb indian developers, they are coding it in Java. So yeah.
To sum up, it's easy to make code unreadable with Java, and Java is a tool with which developers usually disregard the patterns of SAD.
There is a new Java library very useful for building frameworks and in this library there is a particular classpath scan engine that deserves attention as it is original and powerful.
The peculiarity of this engine is the possibility to search classes over a path or the runtime classpath by concatenable and nestable criteria by exploiting the power of the lambda expressions on the native Java reflection elements such Class, Field, Method, Constructor, Module, Package, Annotation, etc ... thus giving the possibility therefore to carry out searches without limits and for any criterion that can be immaginated: this library is called Burningwave Core, it is open source and on the official wiki on github there are a lot of examples.8