I suppose a possible advantage of osascript -l JavaScript
here is that the JS interface is late-binding in its Application references β we can supply an Application name string at run-time, rather than before compilation.
i.e. we can open a file with the Application reference, bypassing Standard Additions and (for the purposes of opening) Finder.
A rough illustration in the subroutine here:
Seems to work with, for example, Sonoma and current BBEdit builds.