Skip to content
Jonathan Buckel edited this page Sep 7, 2024 · 2 revisions

Welcome to MSL!

MSL (My Stack Language) is a stack oriented language, aimed at speedy performance.

What makes it fast?

The first thing that you'll notice in this language is that it doesn't hold your hand and requires you to use reverse polish notation (a b + instead of a + b). Behind the scenes, the interpreter utilizes a stack to make it convenient for running built-in commands, hence the need for RPN. Since you have to manually push data onto the stack to perform operations, you have the ability to optimize your programs massively. Through out this Wiki, you will not only find descriptions and examples of code, you will also find tips for optimizing your programs to take full advantage of what the language has to offer

What's the purpose of this language?

MSL started as a fun experiment to see if I could make a better stack language. When I first became interested in this style of language, I looked for examples and while neat, they were not very intuitive. Of course, MSL can also be tricky and while it's a stack oriented language, I also borrowed from the procedural and functional paradigms to make things a bit nicer to work with. It's also worth noting that other stack languages tend to be locked into fields such as mathematics which is all fine and good, but truthfully, they tend to feel like old school RPN calculators with more buttons. I added things like loops, if statements, and user input functionality to make more versatile programs while still leveraging the stack data structure.

Will MSL ever have a compiler?

Hopefully. I've been learning to implement language interpreters for years and have only written a simple compiler for a made up CPU instruction set. Once I learn more, I would love to make an MSL compiler! Who knows how much faster it could be then?

Clone this wiki locally