June 10, 2022 at 11:48 AM by Dr. Drang
Is there a statute of limitations on blog post followups? I’ve been meaning to write a continuation of my last post for at least four weeks, but between work, the NBA playoffs, and just general laziness, I haven’t gotten around to it. Today, I settle all family business.
First up is the question of what to call AppleScript constructs like this:
applescript: … get the name of every process whose visible is true
According to Apple, this is a filter, which was one of my guesses. It’s a serviceable name but dull. I got more interesting names from readers.
- Hamish Sanderson—author of a huge AppleScript book and creator of the now-deprecated appscript project—suggested query. His argument is that AppleScript’s
whoseclause acts just like the
whereclause in SQL.1
- Tobias suggested list comprehension, matching the construct that Python stole from Haskell.
Both of these are a good fit, but I’ll probably stick to filter because it’s the official nomenclature and is therefore easier for other people to understand. Still, it’s good to be reminded how all languages overlap.
And in the same email where he suggested “query,” Hamish was even more blunt: “As to JXA, that POS was DOA.”
Now that I’ve gotten this post out of the way, maybe that will break the logjam. But don’t hold your breath.
In fact, you can use
whereas a synonym for
whosein AppleScript. ↩