<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">The means to be able to break the abstraction of the dependency hierarchy are unconventional.<br></div><div dir="ltr">I don't think all the reasons you have given so far are enough to justify using this unconventional means.<br></div><div dir="ltr">I hope you will use these means more carefully, abuse of them will weaken their warning effect.<br></div><div dir="ltr"><br></div><div dir="ltr">Glavo</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 29, 2023 at 5:15 PM Ron Pressler <<a href="mailto:ron.pressler@oracle.com">ron.pressler@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 29 Aug 2023, at 01:49, Glavo <<a href="mailto:zjx001202@gmail.com" target="_blank">zjx001202@gmail.com</a>> wrote:<br>
> <br>
> Integrity-breaking options such as --add-opens warn users that they are working in an unusual way.<br>
> This is a strong warning that users should use a safe alternative and should try not to use this option.<br>
> <br>
> But --enable-native-access is different.<br>
> In practice, FFI is very commonly used and cannot be abandoned for a foreseeable long time.<br>
> --enable-native-access will be the only way to enable FFI, which means that a lot of normal applications<br>
> will have to use integrity-breaking options for a long time.<br>
> This is a red flag, which means that users will be less vigilant about breaking integrity.<br>
<br>
Are you saying that Java developers are able to learn the difference between, say, VarHandle and Unsafe but not between --enable-native-access and --add-opens? Yes, there are some differences. Unsafe is in a suspiciously-named package and VarHandle is not while the two flags are just flags (and perhaps we should have named add-opens `unsafe.add-opens` but that ship has sailed). But I think that the main difference is that --enable-native-access is simply new, which means that Java developers will have to learn what it means, just as they do with any new feature.<br>
<br>
— Ron</blockquote></div>