Skip to content

kthompson/panther

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0430262 · Jul 15, 2024
Jul 15, 2024
May 31, 2024
Jul 16, 2022
Mar 27, 2020
May 31, 2024
Apr 7, 2022
Apr 5, 2020
Jul 15, 2024
Jul 15, 2024
Sep 10, 2022
Jul 15, 2024
Jul 15, 2024
Mar 22, 2022
Jul 16, 2022
May 2, 2020
Apr 21, 2020
Mar 24, 2022
May 31, 2024
Apr 11, 2020
May 31, 2024
Jul 15, 2024
Mar 22, 2022
Mar 24, 2022
Mar 22, 2022
May 31, 2024
May 26, 2022
May 26, 2022
Mar 25, 2022
Mar 25, 2022

Repository files navigation

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?

About

Panther programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages