Dragon Programming Language: The Introduction

Dragon Programming Language: The Introduction

The Dragon Programming Language

Dragon Programming Language

Hello guys, I'm here with a new article. Today I will introducing you guys to a new and interesting programming language called "Dragon".

I know most of you might have not heard of this programming language and what you all know is that "Dragon is just a fire breathing creature", but not to worry as I will introduce you to what Dragon is and is about to be.
Enough of the talk!

What is Dragon?

Dragon is an innovative and practical general-purpose, multi-paradigm scripting language. It supports multiple programming paradigms such as imperative, object-oriented, functional, natural programming, and declarative programming using nested structures.
The language is portable (Windows, Linux, Mac OS X, Android, etc.) and can be used to create console and GUI applications. The language is designed to be simple, small, flexible, and fast. It is a dynamically- and weakly-typed language that interprets the source code through the JVM or LLVM.
The first version of the language was released on January 4th, 2018.

The language is simple, trying to be natural, encourage organization and comes with transparent and visual implementation.
It comes with compact syntax and a group of features that enable the programmer to create natural interfaces and declarative domain-specific languages in a fraction of time. It is very small, fast and comes with smart garbage collector that puts the memory under the programmer control. It supports many programming paradigms, comes with useful and practical libraries. The language is designed for productivity and developing high quality solutions that can scale.

Dragon is "Designed for a Clear Goal".

  • Applications programming language.
  • Productivity and developing high quality solutions that can scale.
  • Small and fast language.
  • Simple language that can be used in education.

Also Dragon is influenced by these programming languages:

  • Lua
  • Python
  • Ruby
  • Java
  • QML
  • Ring

Features of Dragon:

The Dragon language comes with these features

💡Tip:

The language is ready for production!

  • Interpreter
  • Declarative programming on the top of Object-Oriented programming
  • No explicit end for statements (No ; or ENTER is required)
  • Portable (Windows, Linux & Mac OS X)
  • Comments (One line ,In-line & Multi-lines)
  • Dynamic Typing
  • Weakly typed
  • Default scope for variables inside functions (Local)
  • Default scope for variables outside functions (global)
  • Garbage Collector - Automatic Memory Management (Escape Analysis and Reference Counting)
  • Structure Programming
  • Rich control structures & Operators
  • No Main Function
  • Call Function before the definition
  • Recursion
  • Multi-line literals
  • Reflection and Meta-programming
  • Clear program structure (Statements then functions)
  • Exception Handling
  • I/O commands
  • Math functions
  • String functions
  • Standard functions
  • File processing functions
  • Database support
  • Create GUI Applications for Desktop
  • .dgn file extension

Simple Syntax

Dragon is a very simple language, and has a very straightforward syntax.
It allows programmers to program without boilerplate code.

To print/display something to the screen using the standard output, we use the 'show' command and 'showln' for output in newline.
Example:

show "Hello, World!"

Output

Hello, World!

For taking input, we can use 'readln()' method which is in the 'std' library.
Example:

show "Say Something: "
a = readln()
showln a

Output:

Say something: I Love Dragon!

I Love Dragon!

Awesome right?
If you will like to know more about Dragon, you can visit the official website Dragon-lang.org.

Well, that is it about Dragon 🐉.