Howdy folks 👋, long time no see!
Today, I'd like to reintroduce you to the Mint, which is a programming language for specifically writing single page applications.
I've introduced Mint 6 years ago 🤯 in this post and a lot of things happened since then, but I feel like that the described day is still something that a lot of developers don't experience. The state of frontend development is still messy and complex. Mint is here to help with that.
To be frank, I'm not that versed in what folks are using now to build webpages. I lost track a while ago (specifically 2 kids ago 👶 yes, I'm a dad). Then, React was the primary way of building single page apps. Svelte and Next.js was pretty new, and we believed that Elm will save us (that didn't happen). What I see nowadays seems overly complex and still carries the same warts that plagued the previous technologies (constant rewrites, projects don't work after running npm install
a year later, etc...).
In the last year having found some inspiration I worked more on Mint than in the previous years. I rewrote a lot of its internal code (which I'll detail briefly at the end of this post), the website and I think it's in a state where it can be used for some production use cases. I wouldn't call it 1.0 – we are still a bit from that, but the language won't change drastically going forward.
So what is Mint, and how can it help me?
Think of Mint as a thing that has everything that you need to build frontend heavy websites (if I forgot something, let me know 😉):
- ☑️ Components
- ☑️ HTML
- ☑️ CSS
- ☑️ Sum Types
- ☑️ Standard Library
- ☑️ State Management
- ☑️ Localization
- ☑️ Routing
- ☑️ Here Documents
- ☑️ Markdown Rendering
- ☑️ Code Splitting
- ☑️ Testing
- ☑️ JavaScript Interop
- ☑️ Assets Handling
- ☑️ Bundler
- ☑️ Formatter
- ☑️ Language Server
- ☑️ Development Server
- ☑️ Package Manager
- ☑️ API Documentation Generator
- ☑️ Dead Code Elimination
- ☑️ Nice Error Messages
- ☑️ Debugging Tools
- ☑️ Source Maps
- ☑️ ️Online Tutorial
- ☑️ Online Try Page
- ☑️ Online Sandbox
After reading through that list, just as an optional exercise, try to check off every item on it with your current stack 😉
Mint has everything (well, except the online stuff) on that list built in the language. One language, one command to rule them all, and one place for the documentation.
It sounds nice, but what it looks like? I might not like it!
Here is the famous counter example, which showcases a tiny portion of the features:
Not that bad, can it actually help me in my current situation, though?
I can't answer that. Mint is a fairly new language with a small community. There are people who write things in it and seem to like it.
At this stage, it is mostly good for greenfield projects or hobby projects, but it is capable - enterprise software can be built with it now. I built (and keep building) more than 100K LOC desktop / SaaS application in it (I will not name it here, but you can easily find out what it is), with many pages and it supports different languages.
Also, there is the Mint website which is also a bigger project (more than a hundred pages) loading each page's content (mostly markdown) asynchronously, so it can be used to build documentation websites or landing pages. It also has the sandbox, which is a small CRUD app and the tutorial which is another small app. All of these are in a single codebase using a single language.
Why are you telling me this now?
As I mentioned in the beginning, I rewrote / refactored a lot of the code.
For example, in 0.19.0
the components were compiled to class components, after the rewrite they are now compiling to functional components. Stores were using a hand made system now they are using signals. But the beauty of it is that it's all internal, it doesn't affect the way you write code.
Previously the outputs were a single JavaScript file, now it will output different files depending on the use of defer
and async
components. It outputs now JavaScript modules, so it's easier to integrate with.
The website was rebuilt from scratch to include the documentation, tutorial and the sandbox and to showcase Mint usage in the wild.
Mint has better documentation, performance and features than ever, and it won't change much syntax wise in the future.
OK, so where can I try it out?
I suggest that you start with the online tutorial. It shows all the features in an interactive way, without having to install anything.
After that, installing Mint is just downloading a binary file, but we have other ways. If you have questions or just want to chat, you can join the Discord server.
Thank you for reading 🙏 and stick around for more Mint posts.
Top comments (0)