What language should I use for an IF coding tutorial?

In my experience, when you learn a new language that’s similar to C (be it TADS, Java, C# and whatnot), you don’t have any real difficulty learning the actual language. The majority of the time is spent learning the APIs (like adv3 or .NET.)

A C-based authoring system would still have an API you’d need to learn. The fact that you’re using a language you already know doesn’t really seem to make it that easier.


These days no one should start by learning C IMO. There are just too many footguns. If you don’t want an interpreted (or JITed) language like Python or Javascript, then why not Rust?


Why not Go? C++? C#? Because of all “C like language”, C has the most platform penetration. Even as recent as 1.5 years ago, I’d have asked, “What’s Rust?”

If we’re talking about total beginners here, my preference would be BASIC. Hey, it’s in the name! Tiny Basic used to be included, but not anymore, apparently.

C should be safe enough if I stay away from the more complex construct. In fact, I plan to use TinyC instead of GCC, keeping it simple.

C-like isn’t necessarily a good thing. Manually managing memory where all the burden of safety is put on you? Gross. No one should have to learn that. And then there’s all the other issues - like uninitialised variables and undefined order of parameter execution, those two tripped me up recently and I’m a very experienced software developer. So many things that the compiler should be catching for you. And some C compilers will warn about some of them, but you’ll have to learn to turn on a bunch of fiddly and inconsistent compiler switches.

If you’re talking about C-like syntax, well that’s the easiest thing to learn. If you’re thinking about what to teach beginnings, I wouldn’t focus on which syntax will be worth using the longest, because it’s easy to learn, and because the similarities are limited once you move beyond function definitions. Would be worth consider Scheme or another Lisp too.


If you feel that strongly about it, please vote for Perl. It has the best error recovery system. Do you understand now why I put choices up there that aren’t necessarily low level?

BTW, Processing is there because that’s my answer for generic programming language since BASIC fell out of favor.

Let’s not talk about LISP. :face_with_raised_eyebrow:

Perl is a bewildering parallel-universe version of programming. You can write clear and readable Perl, but I don’t see much of it. :wink: I wouldn’t recommend it purely because of having to manually get function arguments via shift, or destructuring, etc. Also, error handling without algebraic types is often pretty messy. I see that there is an algebraic types library for Perl, which lifts my evaluation of the language. Is it used for error handling though?

Actually algebraic types make reasoning about optional parameters so much safer that I’d probably prioritise teaching a language with native support for them over any that use null parameters. That doesn’t include TypeScript either, sadly, as you have to manually handle the tagged unions.


TI, Casio and Numworks calculators all support Python development.

Another thought, have you considered REXX from IBM? I first saw it in OS/2 back in the day. It is still viable and has excellent string handling capability.

Personally, I’m not a fan of Python. The whole “tab” issue is a pain in the neck.

1 Like

I think the most confusing thing about this conversation is that you just wanna do this one of the languages you know well, which is fine, but the “reasons” you provide to do it in C just don’t add up.

If you mean “code written in C will run on the most platforms,” I think that’s not true today. You can’t deploy C code to iPhone or iPad unless you buy a Mac and pay Apple $100/year. You can write JavaScript for free, targeting everything with a browser, and everything else that supports Node.js (which includes pretty much every Unix you’d care to run on).

You can deploy Rust code everywhere you can deploy C code, without having to debug memory corruption. You may not be too familiar with Rust, but today, it’s just better than C for all of the things that C does, and if you’re educating a coding newbie by introducing them to C as their first language, you’re not giving them the best possible coding tutorial.

Today, in 2022, none of the languages on your list are very good starter languages. C, Basic, and Perl are all past their prime; learning them as a coding newbie limits that newbie’s potential, rather than expanding it. Processing should be understood as a domain-specific language for drawings; it’s as unsuitable to developing IF as Inform would be to dynamically generating images.

Instead of saying “C has the most platform penetration,” I think you should say, “Look, I’m familiar with C, Perl, Basic, and Processing, and of those languages C has the most platform penetration. Objectively, Python, JavaScript, or Rust would be “better,” but that would require me to develop expertise in Python, JavaScript, or Rust for this, enough expertise to teach one of these languages, and I just don’t feel like learning a new language for this project.”

And that’s totally fine! It’s your volunteer project; you could even do it in Lisp if you wanted to, just for fun!

Just don’t attempt to persuade us that C is best for what you’re working on, any more than Lisp would be.


Uh, hello? If you don’t want me to use C, then don’t vote for it?

Look, the whole project is to prove that coding IF is so easy, it doesn’t matter what coding language you’re using! If I put out a code that people find confusing, then that is a valuable data point, in and of itself. That is the point of the whole exercise!

You do realize that the survey lets you pick multiple languages, right? The use of one doesn’t prevent another. If you want to convert my C/BASIC/whatever language to (insert your favorite language here), I will thank you for it.

Now, if you want to argue that C isn’t usable by beginners, then I disagree because I learned real quick to change my coding style to handle C language “inadequacies”. But that is a separate thread, okay? Don’t discuss it here, please.

This whole discussion has gone in a not-very-useful direction.

You said at the beginning:

Python and Javascript aren’t viable choices at this time, due to too high level of abstraction. Any machine language, if used, will be VM and designed by me.

If that’s true, then Perl, Processing, and BASIC are also too high-level. You’re asking about C. Use C. If you don’t want to use C, figure out what you do want – we can’t help with that.

Writing a simple two-word IF parser takes a few days. That’s why there were so many simple two-word IF platforms in the 1980s.

Writing a solid, fully-featured IF parser system that other people will want to use takes months or years. If you want an idea what that development process looks like, look at the threads about Dialog on this forum. That’s about three years of development by now.


So, I’m curious what I will get for a few weeks of effort. Something in between? Life isn’t black and white. Life is shades of grey.

Yeah, the discussion about language is so bad, I had to flag it as off topic. I really don’t care what language to use, really. That’s why the survey is there. You can pick any or all languages. Is that so hard to understand?

I personally consider C to be of higher level than BASIC, and I’ve written the reasons why. Regardless, who cares about what language is higher levels?

If the choice of language is up to me, I’d choose Processing/SmileBasic and I’ve told you why. What I want to know is what language other people are using to write their code. What language you’re using to write your code. I cannot choose a language for you. You can choose a language for me. That’s why I have to make the survey. Why is it so hard for you to understand that?

If you have a favorite language that is not listed, then choose Other (specify) and that’s it! Don’t try to convince me, or anybody else for that matter, that your chosen language is superior, or worse, that my chosen languages are inferior. That’s the way to language war.

The fact that I have to explain this, well, it’s just so disappointing, you know?

No, I didn’t. I’m pretty well set regarding it.

PS: Javascript isn’t off the table. It’s just that it’s not a consideration at this time . I wrote that, right? Right? Sigh.

I think what everyone is trying to say is that this is your pet project. You’re the best person to decide which language to use. I think it’s safe to say no one believes that using any of the languages you listed is a viable option for a new, modern IF authoring system.

But that doesn’t seem to be what you’re trying to build and you have your reasons for sticking with your initial selection. That’s fine, but the forum can’t help you here. And you’re coming at it a little bit aggressively.

Do your thing and share with us when you have a proof of concept, how about that? :grin:

1 Like

Why do you confuse the matter still? You are not helping! The proof of concept, as you say, will need to be coded in a programming language, and I’m trying to find which ones to use!

Or are you telling me that if I code it in, say Rust, then lots of people will be able to compile it on their machines? You don’t know that!!!

I’m not writing a compiler here. The games will be coded the hard way. It’s a language agnostic design! That’s what coding from scratch means.

Is the concept so foreign that no one here can understand it? Hello?

Who’s doing that? Not me. Don’t drag irrelevant subjects! Sigh.

And that’s even assuming I can actually compile Rust on RPi, since there’s no specific build for it, and the best advice is to just do cross compilation to RPi. Hmmmph!

C/C++ compiler? Gcc. C compiler? TinyC. Easy. Perl is built-in. Processing, you need to install, but it’s relatively seamless. You can do it via PiApp.

And in case you missed it:
Sorry to be aggressive, but people just keep pushing their views onto me. Extremely, extremely, extremely frustrating.

What kind of IF are we talking here? Parser? Choice?

Here is a suggestion; do your project in a language agnostic way. Explain the concepts, program flow and potential tricky parts. Do it in psuedo code or on an even higher conceptual level.

Then you implement it in one or two languages of your choice just to showcase how easy it is.

(During my school years we used Pascal. It is strongly typed and presumably it teached you good coding habits. So use that…)


Parser. Of course I’ll use Pseudocode. It’s the implementation stage that I’m having trouble with. I probably will end up using C, even though I like Processing/Perl, just because I think it’s what lots of people can use, albeit not their preferred language.

I know Pascal. I don’t believe that’s a good language to teach to beginners. I’d sooner use BASIC than Pascal. Sorry.

I wasn’t really serious about Pascal…

My point is that if you are explaining the design good at the pseudocode level the actual language you implement it in are irrelevant. Very few would want to compile your implementation as it is but maybe a few would like to do their own work in your vein but they will then probably do it in the language they are most familiar with.

1 Like

I moved this discussion to a new topic as it’s fairly disconnected from the old one, and the question being asked, which language to use for a coding tutorial, is not really very similar to whether people would like a C IF development library.

Yes. You got it! (To @heasm66 , just in case there’s confusion due to split topic.)

However, that’s not what I’m doing here. Here, I’m doing a survey so that my initial implementation is done on the language most people are familiar with, other than Python and Javascript. Well, Dan has successfully hijacked the subject. I don’t see anyone is voting the survey anymore. :rage:

I’m just going to close the survey. I just don’t see why the question “What programming language do you use to code IF?” somehow got translated into “What programming language should I use to code IF?”

That’s got to be quite a development. Total opposite of what is intended. Very frustrating, indeed.

Maybe I should have been more forceful in the beginning when Dan misinterpreted the question. Maybe I should have said right then that when I said “which language should I use”, I meant “which language does everyone uses.” But I think subsequent exchanges should make it clear. For the misunderstanding to stand for so long, sigh.

Can I suggest everyone be a bit more patient?

You didn’t make it at all clear in your first post what you were planning. Indeed, that’s the very first thing anyone said in reply to you. And then you asked “What language should I use?”, in the context of a Raspberry Pi Zero. Dan points out, rightfully, that on such a computer there basically isn’t any programming language that won’t work. Which means the platform is really quite a red herring.

But you never asked “What language do you use to code IF?”, or what language would you like to, or what language would you think is the best for beginners to learn… even so, most people have been providing relevant points about lots of languages. And we don’t know why Python and Javascript are more abstracted than Perl in your mind, which makes it hard to suggest other languages too.

I suggest you start again, and either ask

  • I want to make a tutorial for learning to program, using either language X, Y, and Z. Which do you think is best?
  • I want to make a tutorial for learning to program. Which language do you think would be best?

For the first, just limit the options to your short list.
For the second, don’t put any limits, just ask for people’s opinions. If you want to rule out whatever ends up on top for whatever personal criteria you have, you can!


well, I don’t know whose dialect of basic has it, but for IF is best one whose has calculated harmful implements :wink: (for the non-initiated to long-standing “philosophical” debates, calculated GOTO) whose IMVHO is preferable to long ON… GOTO lines (whose surprisingly can be readable if using a late basic dialect, with labels in place of line numbers, but AFAICT late basic dialects has also CASE… SELECT, whose is a better alternative.

OTOH, in my humble opinion, as learning language Pascal and even FORTRAN can be better (early FORTRAN has even calculated goto…); not few mess-dos IF was written in Turbo pascal with custom parsers, and well, FORTRAN was without unreasonable doubt the seminal language of IF…

note that FORTRAN, believe it or not, was intended as a language for non-computer people with a solid mathematical background (mathematicians, incl. the actual human computers (open an pre-1950s english dictionary and see…) engineers, statisticians)

if someone wonders, yes, a Naval historian must be also a historian of technology, even more than an historian of aeronautics.

Best regards from Italy,
dott. Piergiorgio.