AltoLang / Alto

Compiler in the works!
MIT License
3 stars 1 forks source link

OO Support Guidelines #55

Open FilipToth opened 3 years ago

FilipToth commented 3 years ago

Background and Motivation

It's no secret that every language is better with OO support. This will also be super useful when writing the runtime API.

TODO

Syntax

namespace MyLib {
    public class MyClass {
        private _number : int = 0

        public function addToNumber(addend : int) {
            _number = _number + addend
        }

        public function getNumber() : int {
            return _number
        }
    }
}