<div dir="auto">Hello!<br><br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, Dec 1, 2025, 20:01 Remi Forax <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000" dir="auto"><div><span style="font-size:12pt">the current status quo is that IDEs (at least IntelliJ) are able to typecheck the creation of Method, Field, MethodHandle, VarHandle, etc so it's not in the language but it's good enough.</span></div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Yes, thank you, Remi! David said that he wants to avoid stringly-typed code, but what is string is solely a question of a tool you use to interpret your program. For an old-school text editor, the whole Java program is simply a string. For example, a typo in a called method name will be unnoticed by such a tool in the same way, as a typo inside a string literal. The Java compiler understands proper Java identifiers but doesn't understand Java strings. A good IDE goes further: it treats certain strings as full-fledged references. When you type MyRecord.class.getField("myComponent"), you get code completion, inspection highlighting of incorrect reference (distinct from compilation error and suppressable, of course), find usage, navigation to the declaration (you can jump from "myComponent" string to an actual component and back). You can even initiate a 'Rename' refactoring inside the string, and the component will be renamed! From the tool point of view, these strings are first-class citizens.</div><div dir="auto"><br></div><div dir="auto">So it's not always necessary to change your code to avoid being stringly-typed. Instead, use proper tools or convince your tool vendor to add first-class reflective references support.</div><div dir="auto"><br></div><div dir="auto">With best regards,</div><div dir="auto">Tagir ValeevĀ </div><div class="gmail_quote gmail_quote_container" dir="auto"></div></div>