Introduced the Solod programming language (So), bringing a subset of the Go language into a C (C11) representation suitable for compiling with GCC, Clang, and zig cc compilers. Solod stands out from Go and Tinygo by implementing manual memory management without a garbage collector, automatic memory allocation, or reference counting. The transpiler for Solod is developed in Go and distributed under the BSD license, with support for Linux, macOS, and Windows.
The language includes support for structures, methods, interfaces, slices, functions returning multiple values, generics, and deferred calls. However, Solod does not include features like pipes, coroutines, and closures for simplicity. Developers can utilize existing LSP servers, linters, integrated development environments, code editors that support the Go language, and the “go test” toolkit when working with Solod.
One of the key features of Solod is its ability to be integrated with applications in the C language bidirectionally without requiring a runtime attachment. The language is particularly suited for system programming tasks with capabilities similar to C but with a syntax and type checking reminiscent of Go. Additionally, Solod can be used to convert Go libraries for use in C projects, with packages like strings, io, bytes, mem, slices, and others already ported to C. Users can also utilize a set of ported Go libraries and a binding over the standard C library libc in Solod programs.
In Solod, memory is allocated primarily on the stack, but developers can use the Alloc / Free functions from the standard library to allocate memory on the heap. While garbage collection and reference counting are not employed, Solod provides features for type checking and detecting array boundary access errors to prevent dangling pointers. AddressSanitizer (-fsanitize=address) in modern compilers is the recommended tool for identifying memory-related issues while working with Solod.