What language is this? The syntax looks really good to me

What language is this? The syntax looks really good to me.

public static List gatherEmployeeSkills(
List employees, Position... positions) {
positions = positions == null || positions.length == 0
? Position.values() : positions;
List searchPositions = Arrays.stream(positions)
.collect(Collectors.toList());
return employees == null ? Collections.emptyList()
: employees.stream()
.filter(employee
-> searchPositions.contains(employee.getPosition()))
.flatMap(employee -> employee.getSkills().stream())
.distinct()
.collect(Collectors.toList());
}

Attached: 1539365150944.jpg (960x866, 62K)

Other urls found in this thread:

winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/
oracle.com/webfolder/technetwork/tutorials/obe/java/Lambda-QuickStart/index.html
twitter.com/NSFWRedditVideo

C#

That's not C# at all.

Looks like it could be java with the new streams stuff.


It'd be considerably tidier in C#

>Looks like it could be java with the new streams stuff.
Kotlin? Haven't used it but it's similar to Java

Looks kinda lika java but I don't recognize the "->" and such.

This is Java 8.

its java (system.out) mixed with C# (properties, foreach, naming convention)

winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/
java 8 streams

oracle.com/webfolder/technetwork/tutorials/obe/java/Lambda-QuickStart/index.html


java 8 lambdas.


They fucked up their lambdas in some dumb ways

There's no C# there, it's all native Java. I don't usually check out Jow Forums and I'm disappointed in you guys.

Wtf. Is this an update to Java 8 or some shit? I've worked a lot with Java 8 but I haven't used it since early 2018.

Nope this was part of the initial Java 8 release, and probably the biggest feature.

Then I was never taught in its usage. To be fair though, I was learning from Java 6 and using Java 8 to program, so that might have been a big part of it.

from Java 6 Books*

They are some pretty huge changes. LINQ is easily my favourite feature in C# and streams basically duplicate it. Lambdas were the other thing that C# did that made it a lot nicer to program than java. It's a shame that closures don't work properly with Java lambdas making them a whole lot less useful.

It's still missing some nice quality of life stuff like the null coalescing and safe navigation operators but it's leaps and bounds ahead of where it was with Java 6 at least.

java 8+
have fun wrapping head around the new stream stuff

Once you do grok it you can turn 50 line functions into functional style 4 liners that are much easier for people to understand and verify once they're used to it.

Many companies that do enterprise development don't even bother to utilize Java 8+ features. I don't know why Oracle bothered.

It's more powerful than the C# equivalent. They want pajeets to shift towards .NET.

Java is becoming a language for those with modern plumbing systems.

Why prodedual languages look so bad when attempting functional style?

they will, but they're busy migrating their current shit into java 8 because 6 is at end of support
now my personal opinion is that such migrations should include evergreening, but the leading IT people at businesses i talked to were all convinced that it would be more economic to hammer their ejb2 structures etc into somewhat jee7-conform shapes and call it a day.
New developments are adopting the new standards, but most of the work in such businesses is maintenance, compliance updates and stuff like this.

oh shit i just realized op refers to copypaste not the image

It might be more powerful by default, but you have to wrap everything in
.stream()
and
.collect(Collectors.toList())
so now your nice tidy 2 line map reduce is 4 lines of ugly. The minor deficiencies in C# can be fixed pretty easily with extension methods (WhereNotNull, DistinctBy...); java is just fucked.

I've seen a lot of fucked up shit in my time but THIS, this is too much. Bunch of npc zoomers thinking they know everything

> low quality bait

??
why bother? what do you hope to accomplish?

>replying
that, newfag

>replying

Attached: 5412874242828145.jpg (550x397, 22K)

Born in '91 thank you very much.

looks like java in desperate need of euthanasis and/or linq

the ABSOLUTE state of Jow Forums