In the four line example above you're seeing lots of factoring done over three decades. #
It's JavaScript with one change, the statements are synchronous. The Nth statement doesn't start until the one before it completes. This version of JavaScript is optimized for the 99% of times you want synchronous code, makes that the default, as all reasonable languages do. Otherwise it's plain old JavaScript, which is a fine Algol-like language. #
The verbs, dialog.ask, rss.readFeed, op.insert, op.attributes.addGroup, are designed to reduce complicated things to their most simple core functionality.#
rss.readFeed, for example, builds on a couple of decades of understanding feed reading, parses all common formats that fit under the RSS umbrella and makes it all flat. Factoring is the antidote to chaos. #
And "op" stands for outline processor. Those verbs go back to the late 80s when they were the first verbs in my first language outliner I called Betty. Why change the name of verbs if they work, recalling that one way to do something is better than two, no matter how much better the second way is. #
Last update: Sunday October 15, 2023; 11:50 PM EDT.
You know those obnoxious sites that pop up dialogs when they think you're about to leave, asking you to subscribe to their email newsletter? Well that won't do for Scripting News readers who are a discerning lot, very loyal, but that wouldn't last long if I did rude stuff like that. So here I am at the bottom of the page quietly encouraging you to sign up for the nightly email. It's got everything from the previous day on Scripting, plus the contents of the linkblog and who knows what else we'll get in there. People really love it. I wish I had done it sooner. And every email has an unsub link so if you want to get out, you can, easily -- no questions asked, and no follow-ups. Go ahead and do it, you won't be sorry! :-)