1.3.0 โ€ข Published 4 years ago

dragon-lang v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago
// fibonacci.drg
// print first one hundred numbers in the fibonacci sequence

class Fibonacci {
  init() {
    this.a = 0;
    this.b = 1;
  }

  next() {
    var newValue = this.a + this.b;
    this.a = this.b;
    this.b = newValue;
    return newValue;
  }
}

function run(times) {
  var fibonacci = Fibonacci();
  for (var i = 0; i < times; i = i + 1) {
    print(fibonacci.next());
  }
}

run(100);

Features

  • โœจ Easy-to-use typing system - dynamically but strongly typed for ease of use.
  • ๐Ÿ”ฅ Eloquent syntax - reduce code length by creating functions, objects and loops.
  • ๐Ÿงน Keep code clean - relative import system allows code to be easily split into files.
  • โšก๏ธ Interpreted language - streamline development with no compile times.
  • ๐Ÿš€ Object-oriented programming - full object system with classes, methods, states and inheritance.
  • โš™ Simple data structures included - strings, numbers, lists and dictionaries.
  • ๐Ÿง  Great control flow - if and else, for and while, switch and case all included.
  • ๐Ÿค– Turing Complete - all features needed to build a complete turing machine.

Documentation

You can get started by following the tutorial provided with the documentation here.

Credit

Author: Tom

License

MIT

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago