A very short version of what is Dart?

A very short version of what is Dart?

and the mandatory Hello World! program using Dart programming language

First off. What is Dart programming language?

Dart is an Object Oriented programming language backed by Google.

Here are the features of the language in short

  • Dart is Type safe
  • Dart has sound null safety
  • Dart also forms the foundation of Flutter. Dart provides the language and runtimes that power Flutter apps, but Dart also supports many core developer tasks like formatting, analyzing, and testing code.
  • Has language features that you'll find in most of the object oriented programming languages.
  • Concurrent programming using isolates—independent workers that are similar to threads but don’t share memory
  • For more Dart Language Overview

How to run dart programs?

You can either run Dart on Dart Playground or install the dart plugin on Visual studio code(vscode). You can follow the instructions here to set it up.

To kick off the mini series we will see the mandatory Hello World! program using the Dart language.

void main() {
  print('Hello, World!');
}
  • Save the above code in a file hello_world.dart and run using the following command dart hello_world.dart
  • It should output Hello, World!
  • The main function is the entry point where the dart runtime starts the code execution and returns void.
  • print function prints the string to the console.
  • Notice the ; at the end of the print statement

That's all for now!

I recommend finishing the setup for VsCode as we won't be using the console to run when the dart plugin tremendously helps us develop software.

We will look at the variables and dart types next

See Variables in Dart

Did you find this article valuable?

Support Runtime Terror Blogs ( •̀ᴗ•́ )و ̑̑ by becoming a sponsor. Any amount is appreciated!