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
Some explanations on I/O stuff:
- What is the difference between I/O-bound and CPU-bound tasks
- What is non-blocking I/O about (java.nio)

#java #io #nio
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