Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 1.44 KB

README.md

File metadata and controls

58 lines (47 loc) · 1.44 KB

Panther

Build status codecov

Panther is a general-purpose, multi-paradigm programming language encompassing strong typing, functional, generic, and object-oriented (class-based) programming disciplines.

Example

def main() = {
    var guess = -1
    var guessCount = 0
    var answer = rnd(100)

    while (guess != answer) {
        println("Guess the answer:")
        guess = int(readLine())
        guessCount = guessCount + 1

        if (guess > answer) {
            println("Lower")
        } else if (guess < answer) {
            println("Higher")
        } else {
            println("Correct: " + string(answer))
            println(string(guessCount) + " total guesses")
        }
    }
}

Current language support

  • Variables
  • Functions
  • Control flow
    • if
    • while
    • for
    • pattern matching
  • Builtin Data Types
  • Int
  • Char
  • String
  • Boolean
  • Algebraic Data Types
    • Product Types
    • Sum Types

Road map

  • complete basics in order to start writing code in Panther
  • rewrite compiler in Panther(self-hosting)
  • type aliases (u8 = System.Byte, ...)
  • optimize programs before emitting
  • floats?