What is Quail?
Multipurpose language with simple yet powerful syntax, embeddable in Java applications and supporting a plenty of different approaches for designing code and writing it.
Why use Quail?
Very customizable
With basic regex preprocessor, ability to use any value as an object with its own methods and fields and possibility to override almost every operator you can create very convenient in use code.
Java-compatible
Since Quail is written in Java, you can either embed Quail in Java app or embed Java source code or compiled jar into your Quail project.
Best features
Quail's goal is to create the most convenient in use language using the best practices, syntaxes and approaches from different languages.
How does it look like?
Here are some amazing Quail examples:
class Person { name = "" method hello(this) out("Hello from " + this.name) } # Add methods to class on the way Person.someMethod = (this, args...) -> {}
Prototype-based OOP
Prototype-oriented programming is the best in scripting, especially dynamic typed languages. You can add methods and fields to the class at the runtime or modify existing, easily inherit via standard tools or make your own inheritance system
Number.sum = (this, a) -> { return this + a } print(15.sum(37))
Everything is an object
You can use every value in Quail as an object, add, remove, change fields and methods, invoke them.
dynamic = 10 dynamic = "Hello" num clarified1 = 10 clarified1 = "Hello" # causes an error num | string clarified2 = 10 clarified2 = "Hello" # Ok clarified2 = [1, 2, 3] # causes an error
Optional static typing
Even though Quail is dynamically typed, it supports the so-called clarifiers and modifiers which modify the variable, so it is restricted to accept only specific type or for example which finalizes the variable, etc.
use "lang/ji" = ji JFrame = ji.getClass("javax.swing.JFrame") win = JFrame("My window") win.setSize(640, 480) win.setDefaultCloseOperation(3) win.setVisible(true) while win.isVisible() {}
Deep Java integration
The JI (Java Integration) library allows you to create a bridge between Java and Quail, so you can grab a class from Java and it will act almost like native Quail class: you can call methods with native Quail values - they will be automatically converted to Java values, you can construct objects and access fields