As I've thought about my last post, and the future of Foxie, as I've explored options for compiling, it's become even more clear: I've taken a wrong-headed approach to designing Foxie so far.

I mean, I wasn't that dumb. But still.

I've designed Foxie as though it were my "ideal" general purpose programming language. But of course, Foxie is not a general purpose language! It's a special purpose language, a "domain-specific language", in programming parlance. It's an odd duck. Like a platypus.

Not quite a platypus, but definitely an interesting creature.

In short: it should serve the purpose it's designed for. That purpose, is to script a pre-made game engine, customize that engine, and make a game. Full stop.

What does this change about the language we've discussed so far?

Animorphs? Anyone? Is this thing on?

First of all, it'll be dynamically typed, with relatively weak typing, or "duck typing". There's absolutely no need to make the game creator define special types for every single data structure they want to use.

That said, we should give the user the option. So this comes back to the sort of optional typing we see in Javascript with systems like Flow. In a way, it'll be both statically and dynamically typed.

Such an underrated movie...

More importantly: being a domain-specific language just for developing RPGs means we can get really super creative with what the syntax means in a given context. We could even define sub-languages for different use cases! For example, scripting conversations vs. configuring the menu UI.

For example, we might have a syntax for developing a list of conversation options using square brackets, like [ opt1, opt2, opt3 ]. When you're defining menu options, it could also define a list, but that list will be interpreted far differently than the other, as a list of options. This specific context not only makes parsing easier, and somewhat negates the need for more static types, but it also lends tremendous power to the creator.

So what do we have now? We have a language that'll look more like Ruby, or Python, rather than Rust, or C++. This is great! This means not only will it be way more approachable, but it'll also be much more powerful, in that we can define separate syntaxes for different use cases.

This last bit is incredibly freeing. Essentially, you have multiple languages in one! Like Racket's different #lang directives, you should be able to swap between languages at will. Not just one language per file, but even with multiple languages in a single module!

"Gotta go gotta go gotta go gotta go" – Cheese

With that, I'll leave you with a song celebrating new beginnings: