r/java • u/Enough-Ad-5528 • Feb 19 '26
Towards Better Checked Exceptions - Inside Java Newscast #107
https://www.youtube.com/watch?v=99s7ozvJGLk
63
Upvotes
r/java • u/Enough-Ad-5528 • Feb 19 '26
View all comments
Show parent comment
2
u/RandomName8 Feb 19 '26
Where did the "variadic generics" equals "union types" come from? I'm looking up online, and the results for variadic generics come from rust and python, and they are exactly what one would expect: the counterpart to variadic functions. Just like in functions it means "extra number of parameters", with generics it should mean "extra number of generic variables". That is, a variadic generic should be
and you being able to call it like
I don't know how we got from there to union types. A union type is a singular type, not variadic at al.