The Biscuit Language (BL) is simple imperative programming language using LLVM backend implemented in C. Language syntax and all it's features are still in development and not ready for real use yet. Biscuit is designed to be simple, fast and explicit. Language syntax is inspired by JAI.
Motivation: I'm enjoying programming in C, but I miss some features there, on the other side C++ seems to be too much complicated for me and language itself require sometimes more attention than solved problem. So I decided to create my own language with all features I need and which I considered useful.
Goals:
Example program:
#load "std/file.bl" main :: fn () s32 { file := file_open(#file); defer file_close(file); content := file_read_all(file); defer mem_free(auto content.ptr); print("%\n", content); return 0; };
main :: fn () s32 { file := file_open(#file); defer file_close(file);
content := file_read_all(file);
defer mem_free(auto content.ptr);
print("%\n", content);
return 0;
}; [/code]
Compile time execution:
$blc -r test.bl Compiler version: 0.5.1 (pre-alpha) Target: x86_64-apple-darwin17.7.0 Compile assembly: test Executing 'main' in compile time... #load "std/file.bl" main :: fn () s32 { file := file_open(#file); defer file_close(file); content := file_read_all(file); defer mem_free(auto content.ptr); print("%\n", content); return 0; }; Execution finished with state: 0 Running native linker... Compiled 1355 lines in 0.258531 seconds. Finished at 05-10-2019 22:37:40
Executing 'main' in compile time... #load "std/file.bl"
main :: fn () s32 { file := file_open(#file); defer file_close(file);
content := file_read_all(file);
defer mem_free(auto content.ptr);
print("%\n", content);
return 0;
};
Execution finished with state: 0
Running native linker... Compiled 1355 lines in 0.258531 seconds.
Finished at 05-10-2019 22:37:40 [/code]
What is done:
What is planned to do: