-
Notifications
You must be signed in to change notification settings - Fork 4
The idea behind volant
Volant is a general-purpose data-oriented high-level programming language with a focus on speed, power, synchronicity, and parallelism. Volant is designed with simplicity in mind, allowing both low-level and high-level features with simple and easy to use syntax. Volant is transpiled to c with no or a very thin layer of abstraction over the code you write, which makes it as fast as c in almost all cases.
Volant is meant for good programmers. While volant does have a strong focus on simplicity, it does not focus on an easy learning curve, memory safety, or anything else that can restrict its power.
Volant does not impose any restrictions on memory handling. Users can manipulate raw memory in any way they want. Volant is not intended to be "safe" on the cost of a huge amount of power loss and added complexity. Rather, volant lets the users decide whether they wanna use the not-so-safe features of the language or use a high-level memory-safe abstraction over them.
While volant's memory handling is as low level as c's, there are other things volant focuses on, which, no doubt, reduce the performance a bit, but the power they give to the users is incredible. Examples include closures, async/await, and concurrency primitives. Volant also provides in-built support for high-level data structures like vectors and maps because of how frequently they are used and how useful they are.
Volant uses garbage collection. Not freeing memory right is one of the biggest causes of bugs in all languages with manual memory management. Also, in a language focused on asynchronicity, the control flow becomes more and more complex as your application grows and it becomes super hard to keep track of allocated memory. Therefore, we decided to address this problem by having a garbage collector. While, of course, you can manually free all memory and the garbage collector will never run, you can choose to not manually free memory and the garbage collector will handle all leaks for you. Volant's garbage collector can also be used as a leak detector, which is not implemented yet but the language will soon support it.
Error handling is very important for a programming language. While having compile-time errors in easy and simple, implementing helpful error logging in runtime requires many performance trade-offs. In a thoroughly tested application, the chances of runtime errors are low, but, in most languages, the runtime still keeps track of all possible error cases, which reduces the performance of the application. Most languages consider that trade-off insignificant but Volant is not one of them. The production build of volant code does not contain any runtime exception handling at all. But runtime error handling is really really important when the software is in the testing phase, therefore, volant has a debug build which takes care of as many as possible runtime errors and prints helpful error messages and stack traces for easy debugging.
Lastly, volant is not very easy to master, but the power volant gives to the users, along with such simplicity, is unmatched.
Note: async/await, concurrency primitives, maps, and debug build are not yet implemented but we're working really hard to implement them as fast as we can.