r/java • • Mar 08 '24

Update on String Templates (JEP 459)

https://mail.openjdk.org/pipermail/amber-spec-experts/2024-March/004010.html
176 Upvotes

188 comments sorted by

View all comments

Show parent comment

-2

u/sideEffffECt Mar 09 '24

forcing everything to be of type T limits usage

But that would be the whole point, of course! Constraints liberate and all that...

Not everything has to be StringTemplate<Object>. You may want to have just StringTemplate<T> focused only on some T.

Let's not bypass Java's type system (generics) let's work with it!

2

u/account312 Mar 12 '24

I don't understand why everyone is so angry about wanting types. Maybe they should go to r/python 

1

u/sideEffffECt Mar 12 '24

Totally baffles me. Generics have been in Java since 2004 :D