5 ms·
As long as they stay away from the lambdas and FP trainwrecks that was 8.
by newforice 9y ago
As long as they stay away from the lambdas and FP trainwrecks that was 8.
- callinyouin 9y agoI can't tell if you're being sarcastic, but I'm guessing you aren't. Anyway, from a full time Java developer's perspective, lambdas and the FP stuff added to Java 8 have sort of been a holy grail. Filtering with streams have single-handedly made my life as a developer measurably easier, but then again I'm a back-end web dev so it comes up a lot. If you're a Java developer, I'd strongly recommend going back and trying some of these features because they really are quite nice once you get the hang of them.
- newforice 9y agoYou seem to have jumped to the conclusion that I haven't tried the FP features. If I hadn't tried them, I wouldn't be criticizing them. If I wanted to work in FP style, I would choose an FP language; not encourage a traditional, solid language to be perverted to do something that is completely against the nature and design of that language.
- eropple 9y agoPlease explain how "I don't have to init an ArrayList and add to it manually" is such a heaven-forfend perversion of that traditional, solid language.
- jdmichal 9y agoTo be fair, the implementation of Streams within Java is certainly filled with ugly boilerplate compared to LINQ in C#. But that's no reason to criticize their mere existence.
- orangecat 9y agoYes, adding lambdas to Java is as silly as adding function pointers to C.
- shock 9y agoSince lambdas and streams are optional, what is your critique of them?
- jswizzy 9y agoFP and OOP are compatible styles. In fact, I would argue that FP is more object orientated than procedural code such as loops.
- dragonwriter 9y agoNot really; FP and OOP are dissimilar in their approach to mutable state and it's management, for instance. You can come up with a synthesis (or probably many different syntheses) of ideas from the two styles to make a style blending inspiration from each, but they aren't directly compatible, and most direct combinations mhave tension between the two styles, or directly subordinate one to the other, for that reason.
- bfung 9y agoIn support of FP and OOP being compatible: The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures." Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress. On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened. http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg03277.html http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m...
- stickfigure 9y agoNothing in OOP requires mutable state. Thing changedThing = oldThing.change(); When you start writing code like this, Java can be quite pleasant.
- deleted 9y ago[deleted]