I wouldn’t want to do it in an example like you gave, but in an example like the one I gave, where the api doesn’t belong to a class like NSString but is part of Foundation Functions Reference.
The reason is just the same reason as replacing ‘current application’ with a property anywhere else, i.e., to cut down repetition and write tidier code.
It’s not a big deal; I just wondered whether it was possible.
EDIT: Incidentally, this works nicely.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use framework "Foundation"
property currApp : a reference to current application
set x to currApp's NSHomeDirectory()
Sorry, I must be missing something. I don’t see the benefit of your code.
In fact, it introduces additional complexity from what I can see.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use framework "Foundation"
property currApp : a reference to current application
set x to currApp's NSHomeDirectory()
-->(NSString) "/Users/Jim"
--- The Normal Way to Get Home Folder ---
set pathHome to POSIX path of (path to home folder)
-->"/Users/Jim/"
Context. Your question isn’t about my code, but about the rationale for using AS-ObjC.
If you’re just wanting to pass the home folder path to another applescript command or handler, then there’s no reason to go calling it in AS-ObjC. OTH, if you need to pass the home folder’s path to a Cocoa API to do something with it, then you need to pass it an NSString (or some other Cocoa object, depending on the API).