-
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, asynchronicity, and concurrency. 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 want to use the not-so-safe features of the language or use a high-level memory-safe abstraction over them.
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 the code grows and it becomes increasingly difficult to keep track of allocated memory. Volant addresses this by having optional garbage collection. While, of course, memory can be manually freed (causing the garbage collector to never run), users can choose not to manually free memory and the garbage collector will handle all leaks. The garbage collector can also be used as a leak detector.
While volant's memory handling is as low level as C's for the sake of performance, 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. For example, closures, async/await, concurrency primitives, etc. Volant also provides in-built support for high-level data structures like vectors and maps for how frequently they are used.
While having compile-time errors is 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 error handling at all. However, runtime error handling is really important when the software is in the testing phase, and so, Volant has a debug build which takes care of runtime error handling with helpful error messages and stack traces for easy debugging.
Lastly, Volant is not very easy to master, but the power it gives to the users, along with such simplicity, is unmatched.
Note: async/await, concurrency primitives, maps, and debug build are not implemented yet.