6 ms·
Java.evolved: Java has evolved. Your code can too
- john-aj 7mo agoGreat idea, although it is quite inconvenient that you have to tap/swipe to show the modern version (at least on mobile). Makes it difficult to compare.
- brunoborges 7mo agoHey mate, what UX would you suggest? Happy to explore ideas! For a better visualization to compare old/new, just click on the card and it will open that particular pattern in a new page.
- kpozin 7mo agoMaybe `ArrowLeft`/`ArrowRight` or `j`/`k` to flip through all of card pairs? Or just allow us to scroll through all the pairs. In either case, both old and new should be visible.
- Traubenfuchs 7mo agoClick to toggle. Hard to go back to „old“ version on mobile.
- hyperhello 7mo agoWhat are you hiding information for? Just show both modes at the same time.
- javaUIevolved 7mo agoCan you add a page where its just a list of all of them in a format like that? https://imgur.com/a/iO42lrs https://imgur.com/a/iO42lrs I would love to just scroll through a page without having to click on individual cards to see both side by side. Love the overall idea of what you did!
- brunoborges 7mo agoDone, updated!
- millerm 7mo agoAs others have stated, there is no point in a "reveal". Simply show the comparison upfront. User interaction should not be necessary as it only needs to be a plain old html document. You didn't need to write any script. When I got through a bit of it, I wasn't sure if I accidentally skipped something or missed a nuance.
- deleted 7mo ago[deleted]
- ggrab 7mo agoAnyone else getting annoyed by these statistics AI generated websites are adding to everything? Like in this example, “0 lines of Python”. What does that even mean? Cool site though, but is it an ad for Copilot? Seems like it, and should be disclosed as such if that’s the case imo.
- brunoborges 7mo agoRe the Python thing, not really. I made that joke because originally yes the HTML generator was written in Python, but I deliberately asked to rewrite in Java. https://github.com/javaevolved/javaevolved.github.io/tree/main/html-generators https://github.com/javaevolved/javaevolved.github.io/tree/ma...
- ekropotin 7mo agoCool. Java is catching up with Kotlin at last
- bzzzt 7mo agoSome of the improvements on that site were introduced in Java more than a decade ago. Your attitude is exactly why I don't want to have to deal with the Kotlin ecosystem. The difference between Java and Kotlin in 2026 is negligible and the benefits don't weigh up to having to listen to Kotlin evangelists proclaiming it's superior the whole time.
- gzread 7mo agoNot many people know this, but you can also write public int x, y; instead of private int x, y; public int getX() {return x;} public void setX(int x) {this.x = x;} public int getY() {return y;} public void setY(int y) {this.y = y;} this is compatible with any language version
- happymellon 7mo agoAnd the second you have anything other than a toy application you'll find out why getters, setters, and validation were invented, and why we them just moved everything to have consistent interfaces.
- tadfisher 7mo agoThis is the meme where the Padawan exposes public fields, the intermediate says you must use setters and getters, and the Jedi just exposes public fields. (Records kind of made this moot, and for the better)
- happymellon 7mo agoExcept records are immutable and have getters and setters as builtins to replicate what we've been doing with Lombok. So enforces what I was saying.
- throwA29B 7mo ago>immutable >setters sigh
- brunoborges 7mo agoTo be clear, Records don't have setters. They are immutable.
- happymellon 7mo agoYeah, sorry, typo. Still they institutionalise getters, which is the opposite of what their argument was.
- nkzd 7mo agoWhy is "modern approach" changing user threads to virtual threads?
- brunoborges 7mo agoTo not worry about system threads. Just create VTs freely without concerns with memory, pooling, etc.
- pshirshov 7mo agoWhat's still missing: - typeclasses/implicits - HKTs - for comprehension - macros/quasiquotes powerful enough to implement my custom reflection
- pivovarit 7mo agoI was bored so I came up with my own for comprehension: https://github.com/pivovarit/for-comprehension4j https://github.com/pivovarit/for-comprehension4j
- brunoborges 7mo agoI will be happy to take in new patterns: https://github.com/javaevolved/javaevolved.github.io/issues https://github.com/javaevolved/javaevolved.github.io/issues
- joe_mwangi 7mo agoTypeclasses are coming. And they will use them for growing the language such as operator overloading, collection literals, narrowing & widening types, etc.
- deleted 7mo ago[deleted]