Panther is a general-purpose, multi-paradigm programming language encompassing strong typing, functional, generic, and object-oriented (class-based) programming disciplines.
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")
}
}
}
- Variables
- Functions
- Control flow
- if
- while
- for
- pattern matching
- Builtin Data Types
- Int
- Char
- String
- Boolean
- Algebraic Data Types
- Product Types
- Sum Types
- 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?