objeck / objeck-lang

Objeck is a modern object-oriented programming language with functional features tailored for machine learning. It emphasizes expression, simplicity, portability, and scalability. The programming environment consists of a compiler, virtual machine, REPL shell, and command line debugger with IDE plugins.
https://objeck.org
Other
154 stars 11 forks source link

Primitive support for '<' and '>' #498

Closed objeck closed 4 months ago

objeck commented 4 months ago

The following code produced a compiler error:

class Test {
    function : Main(args : String[]) ~ Nil {
        a := IntRef->New(7);
        b := IntRef->New(8);

        (a < b)->PrintLine();
        (a = b)->PrintLine();

        c := FloatRef->New(4.175);
        d := FloatRef->New(17.33);

        (c < d)->PrintLine();
        (c = d)->PrintLine();
    }
}
objeck commented 4 months ago

Added in last push