I really like this though!
It's true, you can't just write English sentences and expect the computer to understand you—you have to learn the "formal syntax". But, once you've written that code, it comes out as English sentences, so you can read what your code is doing in English!
I love this. I've never used Hypercard (too young), but I do use Applescript, which was based on Hypertalk's syntax and which—sometimes, when Applescript isn't being crappy—has the same property.
If there are other modern languages that do this effectively and can be used for more than just macOS automation, I'd love to know about them...
(Personally, I do still happen to like Applescript, but it has a lot of problems.)
It is powerful, stable, and addresses many of the issues of using an English-like syntax. It comes with an IDE and two hyperlinked manuals, which contain hundreds of working code samples implementing everything from basic conversations to systems of weights and measures. Finally, as one of the pillars of the modern interactive fiction<1> development community, it is under active development by its creator, in the saddle for twenty-plus years now.
Here's a sample (syntax may be slightly wrong):
A person can be nervous or relaxed. A person is usually relaxed.
The Train Station is a room. Joe is a man in the Train Station. Joe is nervous. "Joe shifts from foot to foot, looking uncomfortable." The description of Joe is "[if Joe is nervous]He's shifting uncomfortably[else]He's standing tall and proud[end if]."
Understand "cheer" as something new. Cheering is an action related to one person.
Carry out cheering (x - a person): if x is nervous: now x is relaxed; otherwise, say "[X] doesn't need to be cheered up." instead.
Report cheering (x - a person): say "You clap [X] on the back. It works: [regarding X: his] mood lightens."<2>
That's all you need for rudimentary gameplay:
TRAIN STATION
Your buddy, Joe, shifts from foot to foot, looking uncomfortable.
> look at joe
He's shifting uncomfortably.
> cheer joe
You clap Joe on the back. It works: his mood lightens.
> examine joe
He's standing tall and proud.
<1>: the medium started by, but not limited to, text adventure games like ADVENT and Zork
<2>: [regarding X: his] is roughly the syntax used to change "his", "her", etc. into the appropriate gender for the variable X. Because games and experiences built with Inform have all-text contents and interfaces, Inform provides a large number of constructs to tame printed strings.
In syntax, the two languages are quite unalike, so I think the relative "easiness" will come down to whether or not the learner was already a programmer.
As for "better:" better at what? better for whom? and why?
HyperTalk was the second programming language I learned (after BASIC) and I had no trouble remembering the grammar. It probably helped that I didn’t have too many preconceptions to unlearn.
One big thing in HyperTalk’s favor that rarely gets mentioned is that it pretty-printed your code automatically. That was a massive help, and well ahead of its time.
I love this idea. Combined with a language like Hypertalk, a new user could foreseeable just figure out the syntax without looking it up.
But they did with hypercard, right? I remember my sister showing me a hypercard presentation she did while she was in primary school.
I don't think COBOL is a good comparator. Although COBOL uses 'English' words, it has massively idiosyncratic programme structure (data division! [0]) and weird data structures (PICTURE clause! [1]), and it was these that made it hard to understand and maintain without a very steep learning curve.
Source: I had a language trajectory that went Pascal -> COBOL -> C -> Hypercard. I was stunned by how rapidly I could create impressive Hypercard applications, with quite sophisticated (for the time) UI and graphics. This was invaluable in the group I worked in, a research group in a large UK engineering company in the early '90s.
Another similar language is Inform 7, the text adventure authoring language, which came out in 2006, about 20 years after Hypercard.[1]
Below is a simple example program in the language. A more involved example can be found here: [2]
"Hello Deductible" by "I.F. Author"
The story headline is "An Interactive Example".
The Living Room is a room. "A comfortably furnished living room."
The Kitchen is north of the Living Room.
The Front Door is south of the Living Room.
The Front Door is a door. The Front Door is closed and locked.
The insurance salesman is a man in the Living Room. The description is "An insurance salesman in a tacky polyester suit. He seems eager to speak to you." Understand "man" as the insurance salesman.
A briefcase is carried by the insurance salesman. The description is "A slightly worn, black briefcase." Understand "case" as the briefcase.
The insurance paperwork is in the briefcase. The description is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork.
Instead of listening to the insurance salesman:
say "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you.";
move the insurance paperwork to the player.
[1] - https://en.wikipedia.org/wiki/Inform_7There is a wider world where they prefer ".length" over some english sentence. Even the ".length" is difficult for them but it's still less grammar to learn.
I wrote some industrial control apps using HyperCard. Unfortunately, it was at a time when the Mac OS was going through a dark period, and just wasn't stable enough to use in a factory. We ended up with Visual Basic instead, but I continued to use HyperCard at home.
If you still have copies of those industrial control HyperCard stacks, I'd love if you were to upload them[1] for the online collection[2] (provided, of course, that doing so doesn't violate any NDAs / etc...).
.length, .size, .len, .count, then all those again but as functions taking an array argument, then again but as method calls, are not. And that’s not all the possibilities!
Seriously I bounce between languages enough that I have to look this shit up every time if autocomplete doesn’t help me out, and even that might take a couple tries.
It's a good thing that Intellisense is top notch !
I guess you could make IEnumerable's Count() into a property and enjoy the same syntax but I am not sure it's a good idea, because Count() needs to enumerate and is therefore O(n), and property syntax may coax you into writing with the expectation that it is O(1).
Then suddenly (it's been years since I did c#) I recall that Count() is added to the interface as an extension method with the "this" keyword. Is it possible to have an extension property? I do not think so but again it's been a while.
For contrast, JaveScript's .length definitely does not count the number of characters, it returns the count of UTF-16 units, which for Emojis yields an incorrect result.
My point being that the conveniences we all enjoy with `.length` come with subtle gotchas that we overcome as devs but are perhaps not necessarily as user-friendly as a more long-winded approach.