Pas de Code
76 subscribers
106 photos
1 file
402 links
What I cannot create, I do not understand.

DM: @alexey_mileev
Original channel in RU: @devballet
Twitter: twitter.com/pasdecode_
Download Telegram
Check out this JEP. They propose to enhance instanceof so it can be used like this:
if (obj instanceof String s) {
    // can use s here
} else {
    // can't use s here
}

 
#java #jep #instanceof
Records (kind of data classes for Java) continue to evolve and it's great! JEP 384 is a second iteration based on the first preview feedback.
 
#java #records #jep
Check out the current state of Project Loom (lightweight threads, "virtual threads" as they call them) in Java.
 
#java #loom #coroutine
Draft JEP on Primitive Objects.
It’s something like an immutable class without identity. Copy of such an object is an exact copy of that original object. And there are plans on treating int, boolean, etc. as primitive objects. We’re waiting for you, List<int>!

#java #jep #primitive
Two for the price of one this time. Bruce Eckel (you’ll most probably know this guy, at least for the “Thinking in Java” book) in his post has criticized Gradle a bit, and Cédric Champeau (was building Groovy, is building Gradle) has tried to challenge Bruce’s points.

#gradle #java #groovy
An interesting post in Git mailing list: creator of JGit describes, what they have to do in order to make their Java implementation of Git faster and why they are still slower than C implementation.

#git #c #java
Java Generics are Turing Complete.pdf
481.1 KB
On our latest peer lab something frightening has come out. Java Generics are Turing Complete. I'll just leave it here...

#java #generics #paper
Ladies and gentlemen, please welcome JEP 430: String Templates!
They've decided to bring something like string interpolation to Java, but to do it BETTER than everyone else.
The result is, well, quite surprising:
String s = STR."\{x} + \{y} = \{x + y}";

#java #language #jep
On potential memory leak caused by double brace initialization (something along the lines of new HashMap<>() {{ ... }}) in Java. I believe I had to fix several such leaks in our app long time ago.

#java #memory #leak
👍1
A short post comparing io and nio in Java.

#java #io #nio
My man is breaking java.lang.String. To make a String not .equals to itself and stuff like that. Amazing! Just imagine maliciously adding code breaking e.g. interned "id" to some popular lib.

#java #string
My man has implemented a toy JVM in Rust. Here you'll find a series of posts with details on .class files, bytecode and other aspects of his rjvm thingy.

#java #jvm #rust
We saw a toy JVM in Rust recently. Here's a bit more serious and ambitious project - JVM in Go. This post is about method discovery. Also try this page if you decide to dive deeper.

#jvm #go #java
Can't even add anything here, the title pretty much speaks for itself: A one-sentence summary of each new JEP from JDK 21

#java #jdk