Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

bog

bog - Programming language

< >

bog is a programming language created in 2020.

#940on PLDB 3Years Old 270Users
0Books 0Papers

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 Token Example
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
fetlang.html · bog.html · moo.html

View source

- Build the next great programming language · Search · Day 213 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com