Does anyone use a general programming language?

I was kind of expecting a wider range of programming languages to be mentioned, given that almost all of them can be used to create IF.

1 Like

I used JavaScript to create House on Highfield Lane.

I chose JavaScript because everyone has it on the computer already, whether PC, Apple or Linux. Modern JavaScript (since ES2015) is a great language, and new interpreters are designed to run old code so my game should run on any browser for many years.

2 Likes

I mean, Lunatix: The Insanity Circle was written in BASIC. This was actually the game that introduced me to IF, and it’s only because I was teaching myself BASIC at the time.

I feel like the narrow range of languages is because coders tend to use what they’re familiar with, and if you have any mainstream knowledge (hobbies or otherwise) or even industry coding experience, then it’s probably gonna be C/C++, Java, or (especially if you’re younger than 30 at the time of writing this) JavaScript.

I know other people have used BASIC before, but I’ve also seen Lua, too, specifically when someone tried implementing a parser game in Minecraft with the ComputerCraft mod.

1 Like

We have over 2,000 adventures written in BASIC catalogued on CASA (and that’s distinct adventures, rather than ports, and also doesn’t include a lot of the more RPG combat-style games). It’s easily the most popular (and portable) system we log; although we don’t have a comprehensive list of Inform titles (which is the second most popular system).

2 Likes

This makes me so happy and I don’t know why! :smiley:

2 Likes

BASIC was like JavaScript is today - most computers had an interpreter built-in (albeit different versions), so the player could just run the game with no other set up.

…Which makes me wonder about Java. It used to be on pretty much every computer, but has not been mentioned much at all (and a search of IFDB includes games in JavaScript). Was there much written in Java 20 years ago?

1 Like

Java is a HUUUUGE heavyweight in general, but I think it fell out of favor in recent years (though it’s still my main language, along with Mono C#). I think it largely got superceded by a combo of C# and JavaScript, especially when Java started adding more and more features, so Java 8 or 9 was no longer always the standard. If you’re on Windows, it’s probably .NET C#. If you’re on Linux, it’s probably C/C++. If you’re on Mac, then…idk. Mac is alien to me. But if you’re trying to hit all the platforms, then it’s probably JavaScript, because the industry movers and shakers see an insane new future where everything is a webpage, so universities and bootcamps are manically training new generations like me to worship at the dark thrones of npm, node, and yarn. Oof.

Ok, we go a bit off-topic here, but I think I have to correct this: You should take a look at WebAssembly, which is a compilation target for all kinds of programming languages and allows deployment to the web. So there is hope that sometime in the not too distant future we will be able to use real programming languages in the web area ;).

1 Like

Oh, I don’t doubt that for a second. I’m just personally paranoid about not having offline copies of my programs, because I’ve been stuck without Internet without warning for days sometimes.

Otherwise, you will never see me denying the capabilities of webpages.

Depends what part of the software world you’re working on. Some industries are still Java top to bottom. In others, Java vanished twenty years ago and hasn’t been heard of since.

If you’re on Mac, then…idk.

You can install Mono/C# on Mac (or Linux) and do the same C# work you were doing on Windows. I was just doing this last night, in fact. (Trying to recompile an old Unity plugin so I can update Meanwhile for the new Macs…)

If you’re targeting only Mac or iPhone, you can use one of Apple’s in-house languages (ObjC or Swift). Not many people are in that position, though. It’s much more common to use a cross-platform toolkit. As you say, most of those are Javascript. Second place is a noisy argument between C#, C++, and probably Lua? I dunno.

1 Like

I saw several statistics about this that showed always something different.

What I really don’t understand: Who not using modern .NET for this? I mean, you can use .NET on all platforms now, including Windows, Mac, Mobile, Web, Linux. The only known restriction is that the MAUI component is not yet ported to Linux.

I’m afraid I haven’t kept track of the difference between .NET and Mono. They’re both owned by Microsoft anyway, right?

See here: https://dotnetfoundation.org/projects/mono
The story behind this is really strange. From my (limited) point of view, it looks like .NET has become exactly what the Mono developers originally aimed for: open source and cross-platform.

1 Like

I take a view that IF can be rendered entirely in HTML and CSS3 (with a bit of Javascript for glamour).
I have learned that the structure of a narrative is a thing of complexity, so I choose what I consider the best language to assist me there, which I judge to be Python.

What’s really needed is some good open source libraries for authors who want to use this technology stack.
I publish one of them. No links here, but if you are interested, I’ll post a link in reply.

1 Like

Javascript is every bit a “real” programming language. So WebAssembly isn’t bringing real programming languages to the web!

But it does help us port older interpreters. That’s how Parchment can play TADS and Hugo games now. And probably all the other interpreters supported by desktop interpreters like Gargoyle.

3 Likes

Yeah. Almost exactly 40 years ago, Alan Perlis published a list of “Epigrams in Programming”. One of them is “You can measure a programmer’s perspective by noting his attitude on the continuing vitality of FORTRAN.”

I think that was true in 1982 when he wrote it, it remains true today, and it’s true even if you substitute “JavaScript” (or “Python”) for “FORTRAN”.

Of course you wouldn’t want to do the substitution IN FORTRAN because good god string manipulation in FORTRAN is a pain.

2 Likes

Fortunately not for Crowther and Woods…

you give also a solid explanation of why there was so many text adventures in BASIC: the trio of string manipulation instruction (left$, right$ and mid$) ease the coding of string manipulating routines…

Best regards from Italy,
dott. Piergiorgio.

2 Likes

Also, BASIC was included as standard with most of the early home computers. Other languages cost extra. Even PCs had some form of BASIC included up until Windows 98, IIRC.

Most early versions were interpreted, which is much more convenient when experimenting on a tape based machine.

1 Like

Okay, that was provocative of me, of course. But to make it more precise: By “real” programming languages, I mean those that are type-safe, where many problems in the code are already revealed during the compilation process, and where you can run the applications in a real debugger. This applies, for example, to languages like C#, Java, C++, etc., all of which I believe can be used with WASM. I openly admit that compiler languages like C# bring a comfort to programming that I wouldn’t want to miss and that probably makes you terribly addicted in the long run. Of course, that’s ultimately subjective, I realize. But in JavaScript e.g. I would never voluntarily realize something that exceeds 10 lines.

  • Most modern JavaScript IDEs have powerful type inference, even VS Code.
  • Most enterprise applications use TypeScript which grants all those conforts.
  • You could argue that modern JS is a compiled language in the sense that you never package and deploy the code you write. It goes through optimization and minification.
  • The compilation step (for either JS or TS) is a lot faster than for C#, Java et al.

I find this “real” programming language discussion really dumb and a sign of either arrogance or immaturity. Every language has its pros and cons. I would never suggest you write an OS kernel with JavaScript, and I would never suggest you write a web application with C# (despite what .NET enthusiasts may believe). If you don’t like higher-level languages, why don’t you write straight in Assembly or binary? :unamused:

By the way, just gonna leave these here:

1 Like