<div dir="ltr"><div>One thing I can think of is that generics makes life a hell here, and can spawn a lot of reasonable questions with non-obvious answers (especially if you still believe in reified generics in the future, and try to prepare for it).</div><div><br></div><div>So, if you have</div><div><br></div><div>```</div><div>interface Foo<T> { String hello(T a); }</div><div>```</div><div><br></div><div>Then if you write (in your notation): `Foo<T>::hello[T]`, where T is a type argument, then you have to return `Object.class` as the parameter type.</div><div><br></div><div>However, if you have `Foo<String>::hello[String]`, then one could reasonably expect it to return `String.class` as the parameter type, but doing so would also be strange, because the actual type (queried via reflection) would be `Object.class`.</div><div><br></div><div>Not to mention that `hello` can be overloaded with a concrete type, but I guess that is a theoretical problem even in today's Java.</div><div><br></div><div>Attila</div><div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Artyom Drozdov <<a href="mailto:artyomcool2@gmail.com">artyomcool2@gmail.com</a>> ezt írta (időpont: 2025. dec. 1., H, 19:59):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Symbolic reflective constants is a something I was always dreamed about.</div><div dir="auto">I'm currently using old-but-gold CLDC HI for my pet project and I'm really struggling without class literals (so I'll probably add them).</div><div dir="auto">The same way I feel about fields/methods references. I suppose it was discussed before, but it would be great to know, why can't we ask user for the full signature? Like:</div><div dir="auto"><br></div><div dir="auto">Method m = Foo::method[String, int];</div><div dir="auto"><br></div><div dir="auto">Or even (argument names here is an optional hint for the reader and IDE/linters):</div><div dir="auto"><br></div><div dir="auto">Method m = Foo::method[String name, int size];</div><div dir="auto"><br></div><div dir="auto">Of course, the syntax is not something that really worth to discuss here. Probably, we might want to specify the return type as well, but, again, that's about syntax.</div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><br>
</div>
</div>

</blockquote></div></div></div>
</blockquote></div></div>