What's new in Rant 4, and a brief reflection on past development
Seven years ago, when I first started working on Rant, I had no intentions of it ever becoming a serious project that other people would use. I was a freshman in college and just wanted a fun project to work on in my spare time. It was an opportunity for me to improve my programming skills without the stress of project deadlines or grades.
The lack of oversight allowed me to experiment with ideas that were honestly terrible. I still cringe thinking back on how badly-designed the first few iterations of Rant were. I had literally no idea what I was doing. I am astonished that it gained any positive attention at all. I received a lot of well-deserved criticism on every aspect of the project from the language design to the lackluster documentation and code.
Since entering the professional software world a few years ago I've learned a lot about what goes into writing good software. I took some time to step back and re-evaluate what I wanted Rant to become. I wanted it to be useful and accessible to as many people as possible. I wanted better performance, portability, and ease of use. To these ends, I decided to scrap the entire C# codebase and rewrite it in Rust.
It's been a few months and a lot of work has happened: Rant 4 is now in alpha! You can download and run it yourself, on any platform with Rust compiler support. It has API docs that are actually good. I don't feel ashamed to look at the code now. It's not perfect, but I'm honestly pretty proud of how it's shaping up.
I completely redesigned the entire language. Queries are gone. The weird function-based variable system is history. The confusing "multi-channel" output is no more. The weird, embedded scripting language-in-a-language was unceremoniously yeeted. Everything confusing or badly-designed was thrown out, and what got left over was meticulously re-examined from both design and implementation standpoints.
Here's a short list of what Rant 4 introduces to the language:
- A robust variable system with primitives and collection types as first-class language features
- Functions with support for optional and variadic parameters
- Closures that can capture variables
- Blocks as a value type
- Access paths for nested indexing and map key access
- A modestly-sized, well-documented standard library
- Function composition to reduce nesting (no more "bracket hell")
- Simplified control flow and block attributes
- Fallback expressions when a variable, list index, or map key isn't found
- A simple, no-nonsense module system for creating Rant libraries
All of these features are live in the alpha and you can start playing with them now. The Rant reference documentation goes over each feature, what it does, and how it's used. A lot of stuff is still WIP and not finished, but what's there already can do quite a lot.
The road to beta
There's still a long way to go for development before Rant 4 goes into beta. In particular, I am busy doing design work for the following features:
- Localization support for number formatting, capitalization, and other locale-specific features
- Weighted block selection
- Slice notation
- Static analysis and compiler warnings
- Protected calls
- A possible new collection type for tabular data
If you're interested in helping out with development or just providing feedback, head over to the GitHub repository to get started and learn more.
I probably would never use Rant but I guess I'm you seven years ago. A freshman started working on a state management library for fun to improve my skills and not worrying about missing deadlines and I'm going through the same roller coaster of emotions embarrassed for stupid decisions I made but also proud of things that I never thought I could do.