6 ms·
> What sucks about these languages is complex sentences that look like loose English but are actually formal syntax. I really like this though! It's true, you
by Wowfunhappy 6y ago
> What sucks about these languages is complex sentences that look like loose English but are actually formal syntax.
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...
- cxr 6y agoApple's SK8 was intended to be the original successor to HyperCard and led to AppleScript. It's available under some quasi-open source license. https://en.wikipedia.org/wiki/SK8 https://en.wikipedia.org/wiki/SK8 https://github.com/waywardmonkeys/apple_sk8 https://github.com/waywardmonkeys/apple_sk8
- hobs 6y agoHaving run non-trivial programs in Applescript I want to say that its an absolutely nightmare to debug - reading english sentences describing program operations is not understanding intent at all, its just sooooo verbose.
- Wowfunhappy 6y agoApplescript is annoying for reasons that I don't think have to do with being English-like. The type system is obtuse and exceedingly difficult to follow, and a lot of the more advanced syntax doesn't actually read much like English. (Personally, I do still happen to like Applescript, but it has a lot of problems.)
- maxwelljoslyn 6y ago'Wowfunhappy, I strongly suggest you take a look at the Inform 7 programming language: http://inform7.com/ http://inform7.com/ 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.
- deleted 6y ago[deleted]
- anthk 6y agoInform6 is much better and easier.
- maxwelljoslyn 6y agoThanks for responding. 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?
- anthk 6y agobetter _than_ if7. By design. If7 may be better for the non-programmer, but the syntax can be hideous. If6 allows you to be pretty modular writting very few of logic code.
- 082349872349872 6y agoThink of if7 as low-hanging fruit: if people who enjoy text adventures can't be bothered to play guess-the-verb, who can?