Virgil is a programming language designed for fast, dependency-free programs. Its design blends functional and object-oriented programming paradigms for expressiveness and performance. Virgil’s compiler produces optimized, standalone native executables, WebAssembly modules, or JARs for the JVM. For quick turnaround in testing and debugging, programs can also be run directly on a built-in interpreter. It is well-suited to writing small and fast programs, which makes it ideal for building certain kinds of programs like compilers and virtual machines. It is currently being used for virtual machine and programming language research, in particular the development of a next-generation WebAssembly virtual machine, Wizard.
Bookmarked for future reference.
Can it produce libraries usable with C?
Maybe it is interesting for me since I’m a little bit of a programming language nerd. It might even become my personal substitute for C++.
The documentation says it uses garbage collection so it may not be fully compatible with C++ or C which don’t use garbage collection.
Garbage collection has nothing to do with compatibility. DotNet happily inter-ops with C, so does D.
If my memory serves me right you can “pin” pointers which interop with native code to stop them being moved or GC’d in .Net
Yeah, you can talk to native code directly using unsafe code, but you can also just pin strings/structs and Marshal them so they are safe to be used.
The unsafe version looks more like C/C++ with pointers etc.