Skip to content

Zen0x7/Haiku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Haiku

Syntax

Classes and objects

use number

class Trick {
  public name
  constructor name
  do() {
    using output("This trick is called {name} and have {rate}% of success").with({
      name = this.name
      rate = number.random(75, 100)
    })
  }
}

trick = new Trick("*Lean*")
trick.do // "This trick is called *Lean* and have 100% of success"

Class-free objects

App.haiku

output("We have {connectedUsers} users connected!").with({
  connectedUsers = db("devices").where("connected", true).count()
})

Addons/DB.ha

export {
    invoke(name) builder(mysql).table(name)
}

Config/Addons.hc

path = "./Addons" 
core = Builder MySQL Output
addons = DB

Releases

No releases published

Packages

No packages published