buzz
buzz copied to clipboard
π¨βπ buzz, A small/lightweight statically typed scripting language
- [ ] Package spec - [ ] Fetching from several sources: public registry, git repository - [ ] List dependencies and fetch them - [ ] Resolve conflicts
```buzz object Stuff { Buffer buffer, fun ~destroy() > void { buffer.deinit(); } } ```
```buzz fun willFail() > void !> str { throw "fail"; } fun main([str] args) > void { willFail() catch void; } ```
```buzz object Population { [T] population, fun count() > num { return this.population.len(); } } Population myPopulation = Population{ population = [str, "joe", "john", "burt"], }; myPopulation.count() == 3; ```
```buzz match (n) { Locale.frFR, Locale.frBE -> { print("On parle franΓ§ais!"); return true; }, Locale.en -> print("we speak english!"), default -> print("Single statement is allowed"), } ``` If evaluated expression...
```buzz if (some -> unwrapped, other -> unwrappedToo) { | ... } ``` or different keyword to avoid doing all this in the middle of regular if bytecode ```buzz let...
Make it work on Windows: - build MIR for windows - does pcre for windows? - io and fs apis are somewhat different for windows
```buzz object MyObj { str name, private num age, } ``` or, private by default? ```buzz object MyObj { public str name, num age, } ```