This is the most comfy language

Attached: 1200px-Java_programming_language_logo.svg.png (1200x2195, 116K)

why not upgrade to kotlin? it runs on the jvm. Its literally a fucking upgrade

They said the same thing about Scala.

oh... whats wrong with scala?

its un-scala-ble.

somebody... please laugh at my joke...

Problem with Scala is that it broke compatibility with Java to truly be a functional language, but it still has some warts of Java. Also, the definitions of simple shit like maps are all fucked up.

please laugh...

its a meh joke because the original intention of the name scala was that it was scale-able

cont.
its the equivalent of borats "this is a suit.... not!" joke

Attached: pep.jpg (255x253, 9K)

whats wrong with maps? they work just like normal for me in kotlin/java. the only bitch is multithreaded & concurrency

aw im sorry bro. im just in a shit mood cause work today sucked. dont mind me

Attached: 17456-5[1].jpg (1200x1200, 101K)

its okay user, i hope things get better for u! go you!

Thanks, Pajeet. 5 rupis have been deposited in your account.

Attached: haaaah.jpg (306x312, 27K)

stop using java

Attached: 10101002022010.jpg (720x540, 74K)

if java supported vars (implicit typing), native optionals and coroutines, I'd be down to use it.

funny story, most dev teams still use old ass outdated versions of java for some fucking reason. like 1.7 and 1.8. I think they're up to fucking 1.13 now

Attached: o4w97sa7iidz.jpg (720x720, 72K)

Why is Java still relevant?
It's basically banned from the web.

How does the future for Java look?

rupees, you mouthbreathing amerimutt

Attached: 1554143972553.gif (849x458, 150K)

>1100 students in one classroom as a perk
no thank you, come again

>Why is Java still relevant?
struts, JAWS, Android. Basically all the ancient shit.

>C#
*blocks your path*

My Java teacher was a creep but the guy was a good programmer. Worked for Northrop or Lockheed or something like that and taught part-time.

So why would anyone learn Java nowadays if it's all about the ancient shit?

Oh, boy... Just wait until you get a job

When you never knew any better.

Scala was for chads, and it got near zero community size

so, now Kotlin is for retards. by retards.

b-but, do you have a Twitter account, do you?

>Scala/Kotlin/Clojure
>building programming language on top of the programming language to solve the problem of the primary programming language
>implying something good

Java has all of those things now

No oracle shill, dont mix bloated with comfy

>It's basically banned from the web.
What are you talking about?

On rust:
type Byte = u8;

fn print(bytes: &[Byte]) {
println!("{:02X?}", bytes);
}

fn sum_one_formatted(bytes: &[Byte]) -> String {
bytes.into_iter().map(|b| 0x1 + b).map(|b| format!("{:02X?} ", b)).collect()
}

fn main() {
let bytes: [Byte;2]= [0x22, 0xAF];
print(&bytes);
println!("{}", sum_one_formatted(&bytes));
}

On Java:
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;


public class Byting {
static void print(byte[] byteArray) {
for (byte b: byteArray) {
System.out.print(String.format("%02X ", b)); //Lol print("%02X", byte) unavailable
}
System.out.println();
}

static String sumOneFormatted(byte[] byteArray) {
//var stream = Arrays.stream(byteArray); //LOL NOPE, stream(byte[]) unavailable
List bytes = new ArrayList(byteArray.length);
for (byte b: byteArray) {
bytes.add(Byte.valueOf(b));
}

var stream = bytes.stream();
return stream.map(b -> 0x1 + b).map(x -> String.format("%02X ", 0xFF &x)).reduce("", String::concat); // Lol need 0xFF hacks to avoid overflow
}

public static void main(String args[]) {

byte[] byteArray = new byte[] { (byte) 0x22, (byte) 0xAF };
print(byteArray);

System.out.println(sumOneFormatted(byteArray));
}
}

time ./byte
[22, AF]
23 B0

real 0m0,002s
user 0m0,002s
sys 0m0,000s


$ time java Byting
22 AF
23 B0

real 0m0,081s
user 0m0,096s
sys 0m0,013s

Java sooo comfy

>map(|b| format!("{:02X?} ", b))

WTF is this bullshit?

it should be just a for-each of increment + print

idiots, idiots everywhere.

You're missing the point. Did you even read the function names?

You can too map(print(x+1)) instead of map x+1 followed by map print.

I actually have a job :D In it's Java related. I'm just trying to find some alternatives with my knowledge because this is boring as hell and as you said: ancient shit.

>recViewFac = recyclerView.factory.createNewFactory(getApplicationContext(), MainActivity, findViewById(Resources.getID(R.id.recview));
>recView = recViewFac.createView(getApplicationContext(), findViewByID(Resources.getID(R.id.recview));

Attached: 1536720884334s.jpg (250x191, 6K)

Java is fine. Most people get taught ancient versions of Java. Even in 2019 I still see people getting taught Java 1.6.

/thread

.into_iter()
.collect()
Rust needs HKTs.

He means that websites no longer run Java code themself because (Javascript and) security issues.

Attached: 1556757707637.jpg (380x379, 39K)

>not Typescript.

We will get them Soon™.

python is better than java

Attached: java vs python.png (586x5041, 2.34M)

>Java is low level

Open a file and read from it.

byte[] bytes = Files.readAllBytes(Paths.get("myfile.txt));

imports, motherfucker, do you write them?

low IQ level

fify

>not letting his editor/IDE auto imports for him
Grandpa...

My IDE takes care of imports whenever I save

>nio
The JCL is such a massive farce. I watched the devs replace packages with newer ones and keeping the old ones as decorations far too many times and yet you still need to get an httpclient and tuples from Apache and Google's asses and then get BTFO by the amount of times the package has changed since all resources online have been made.

java is awful.

laffed

HttpClient was introduced in Java 9

How come?

ITT: people who think java is still in version 5

>Java post 8
I am not paying Oracle to get a lawsuit later on.

>what is OpenJDK

based
>kotlin
bloat

kek
the money tho

>bloat
based

>based
based

at the mercy of Larry Ellison

Attached: Untitled.png (675x251, 55K)

No legacy support, I couldn't even build some obscure tool I found on github, had to manually download the entire runtime library from Oracles website, which defeats the purpose of muh multi-platform.

Be specific.
>no legacy support
What the fuck are you even talking about?

You can create bundles JRE's for your application.

Have you seen java programmers?
Look at what it does to them.

Java is indeed an atrocious language, well demonstrated dear rustfag

this it makes them awfully rich and they usually end up dying from too much coke and hookers cruising around the world.

I don't see how these are specific to HKTs, wouldn't type classes be the proper term?

>sudo apt install openjdk
>it's for fucking java 12
>the repo was written in some older version
>some functions were deprecated
>built it
>not working
I write C++ for a living and runtime libs are cancer, but at least glibc is consistent with its legacy and doesn't change on a whim of a company or a few individuals.

wtf have you done? are you literally retarded? Someone who doesn't have autism needs to tell me if this is a troll or not.

Java 11 introduced implicit typing.


Java is a new language now, it becoming comfy and comfy after each update.

That is literally impossible unless you are dealing with some of the very few libs that have been removed due to jigsaw.

I think you are confusing java with javascript.

If you have HKTs you can use fmap rather than map which eliminates the need for both of those functions.

I'm just saying, isn't that thanks to generics (the type classes variety of generics, more specifically) and not HKTs per se? People always talk about HKTs, but the term HKT actually refers to the really niche syntax Haskell has for representing types of things.

If one were to learn proper java and wanted to avoid the pajeet Mr NagoorBabu way, what's the best resource? I already know the basics of programming such as conditionals, loops, etc.

>literally impossible
My anecdotal experience says otherwise. If I remember right it's something to do with some Application class.
I'm not a Java expert but if a runtime library deprecates something by completely removing it from future versions then it's a shit one.

>I'm just saying, isn't that thanks to generics (the type classes variety of generics, more specifically) and not HKTs per se?
No, it's definitely HKTs that allows you to abstract a function over a variety of different container types that are themselves generic.
>People always talk about HKTs, but the term HKT actually refers to the really niche syntax Haskell has for representing types of things.
HKTs means type constructors can be used as type parameters. It's not specific to Haskell - you have a form of it in C++ with template template parameters.

Not with all the fucking boilerplate you have to write

>No, it's definitely HKTs that allows you to abstract a function over a variety of different container types that are themselves generic.
You could do that with an ad hoc generics syntax too though (Java already has generics, combine that with interfaces and it probably could do anything Haskell can do), I think it's type classes that actually allows the generics in Haskell and templates in C++, and HKTs are just a nice language for describing that.

Also to* your account

You'd have to write a different map for every container if you just plan to use ad hoc generics (by which I presume you mean overloading?).
With first order generics then Rust traits, Java interfaces and Haskell type classes are pretty much equivalent to each other.

It's quite simple. Without HKTs you have to erase a Container of Foo to an Iterator of Foo using into_iterator, and then to get back to a Container of Foo you need to use collect. With HKTs you can just make Container a parameter of the map function too.

>It's quite simple. Without HKTs you have to erase a Container of Foo to an Iterator of Foo using into_iterator, and then to get back to a Container of Foo you need to use collect. With HKTs you can just make Container a parameter of the map function too.
I think this was the point I was trying to make too - if you have HKTs you have a flexible syntax for describing this, but even without it you can perform the same stuff for example using Java's interface / subtyping mechanism and type casting afterwards. The casting operation just isn't type checked because the language's type syntax wasn't expressive enough to handle a map function returning a variable type value.

Java has had that for ages with Lombok already.

Java is a programming language targeting the JVM.
Scala is a programming language targeting the JVM.
Kotlin is a programming language targeting the JVM.
Clojure is a programming language targeting the JVM.

The whole point of generics is that you don't need a cast. It tracks types in and out of a function directly. Casts are essentially what into_iter and collect are.

The JVM is built around the semantics of Java, and the other languages which target the JVM are limited by those semantics.

Another point I was making, I wouldn't be so sure about that. Modern Java might be able to express type variables combined with interfaces, pretty much letting you imitate any feature HKTs might epxress

This should be a valid Java function signature:
T max(T e1, T e2) {

That's not HKTs though? HKTs would be writing something like this.
static C map(C in, Function f);
Unless the higher kinded type can be used as a parameter you can't express the full range of genericity directly in the function signature (and thus avoid casts).

Yeah. It was just showcasing how it's indeed possible to do pretty much the same things without HKTs, even Java can do most of it with their ad hoc system I think (generic containers like the map function you posted, too, I just don't know enough Java to type it out). HKTs are just a nice and consistent language for describing the same thing. What actually matters most is traits / type classes / templates, and you should be able to have those with or without HKTs.

I could send you a pallet of toilet paper instead

Or maybe I'm full of shit and the moment your type system can express container types as variables it _has_ HKTs, even if it otherwise doesn't have a notion of functions of types.

Not sure if this is valid Java:
T returnUnchanged(T ts) {

Well no, this isn't possible in Java because Java doesn't have HKT. The best you can do is - well something like this instead.
static Stream map(Stream in, Function f);
Which is comparable to the map method in Rust. In fact Java's Stream interface is very similar to Iterators in Rust - and they're bogged down by the same problem of having to use a .stream()/.into_iter() method to erase the container type and then a .collect() method to get it back.

The fact that you can do much the same thing with Java interfaces as you can with Rust traits is what I was expressing here , whether you have traits or interfaces or type classes doesn't matter. What matters is what kinds of type you can abstract over.

Alright, seems like you know your stuff better than me so I'll take you word for it.

Maven is the most mature build tool/package manager out there.

Building api's/webstack using spring boot with mapstruct and lombok is probably the most comfy and solid option there is.