Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

bog

< >

bog is a programming language created in 2020.

#626on PLDB 4Years Old
Download source code:
git clone https://github.com/Vexu/bog
Source Code

Small, strongly typed, embeddable language.


Example from the web:
let {print} = import "std.io" let world = "world" print(f"hello {world}!")

Language features

Feature Supported Example Token
Async Await ✓ let {print} = import "std.io" let foo = fn() print("foo started") let bar_frame = async bar() print("in foo") let bar_res = await bar_frame print("foo finished") return bar_res let bar = fn() print("bar started") suspend print("bar resumed") suspend print("bar finished") return 1 print("main started") let foo_frame = async foo() print("in main") let res = await foo_frame print("main finished:", res)
hasForLoops ✓ let mut sum = 0 for let c in "hellö wörld" match c "h" => sum += 1 "e" => sum += 2 "l" => sum += 3 "ö" => sum += 4 "w" => sum += 5 "d" => sum += 6
hasTryCatch ✓ let foo = fn(arg) try fails_on_1(arg) fails_on_2(arg) fails_on_3(arg) catch let err return err return 99
Destructuring ✓ let add = fn ((a,b)) a + b let tuplify = fn (a,b) (a,b) return add(tuplify(1,2)) # 3
Semantic Indentation ✓
File Imports ✓ let {print} = import "std.io"
Strings ✓ "pldb"
Assignment ✓ let pldb = "pldb"
Print() Debugging ✓

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v154.3.0