buzz
buzz copied to clipboard
👨🚀 buzz, A small/lightweight statically typed scripting language
```buzz zdef( "mylib", ` fn hello() void; fn bye() void; `, prefix: "mylib" ) ```
```buzz zdef("mylib", "fn Some_Function() void;", as: "someFunction"); ``` The syntax is not obvious here. This would not work for multiple definition zdef statements.
```buzz cdef("/path/to/foreign", ` typedef struct Person { unsigned int age, const char *title name, fn hello(self: Person) void; }; void hello(*Person self); unsigned int mul(unsigned int a, unsigned int b);...
Ability to declare custom types: ```buzz typedef Callback = Function(str element) > bool; ```
Right now lists and maps have their own version of map, filter, reduce, etc. We could imagine a common iterator interface supported by fibers that both could implement. This way...
```buzz protocol Countable:: { fun add(T value) > void; } object Item{} object(Countable::) Person { [Item] items, fun add(Item value) > void { this.items.append(value); } } ```
Depending on what type of program you might be writting with buzz. You might want to fine-tune the allocation strategy used: - Small memory footprint and short lifespan: arena allocator...