I’m trying to “standardize” my way of coding on the Mac.
In many languages there are style guides that address coding structure and variable naming conventions etc. These guides, being style guides, are always “on top” of any restrictions imposed by the language itself. Is there such a guide for working with AppleScript and AppleScriptObjC? The AppleScript Language Reference doesn’t give me much guidance beyond what is “lexically” acceptable in the language.
If not, is there a defacto one that has been adopted from another language, like C?
Shane Stanley’s book provides some good insights.
I believe there is some guides on Apples Website.
Also just reviewing these forums often folks will chime in
On some proper syntaxing, formatting etc.
And on tre flip side you find conflicting conventions.
I’ve found it’s taken my own Mistakes to help me learn.
Camelcasing my variables was a big one.
I’ve also found with OBJC that there are many different ways
To format your syntaxing with square bracketing, dot syntaxing etc.
The thing about AppleScript is that it has the ability to provide
Your own scripting dictionary definitions. So you can come
Up with your own way to “word” your code.
Apples site has some AppleScript keyword restrictions to check out.
And then you may run into conflicts with certain frameworks that
Conflict with AppleScript’s Standard Additions and have to pipe some
Explore Script Debugger’s dictionary.
Explore Xcode’s documentation for frameworks,
Best thing is Everyday AppleScript OBJC from shane
Thank you for your suggestions. I do have “Everyday AppleScriptObjC” from shane (that’s good).
Since no real published standard exists, that should do as a good guide to the structuring of the code. I take it that the variable naming conventions in the book, are likely a good “go-by” as well.