| > The language itself is quite beautiful when used properly and with modern features. I respect your opinion but I wouldn't call Java beautiful (of course it depends on your definition of beautiful). It takes so much ceremony to do things you would do without any thought in other languages . Initiating a mutable set Python `a = {1,2}` What most Java programmers do ```
var a = new HashSet<>();
a.add(1);
a.add(2);
``` Shorter one but requires more ceremony, and hence knowledge of more language semantics ```
var a = new HashSet<>(new Arraylist<>(List.of(1,2))
``` I don't know if the above works but the Idea is to initiate a list and pass it into a HashSet constructor. Similarly Java 21 allows you to model union types but doing so requires you to define N+1 classes where N is the number of union cases whereas in other languages it's as simple as `type A = C |D` |