Understanding dart runtime

102 Views Asked by At

I'm new to the Dart language and trying to understand its workings, particularly the terminology. I'm currently confused about the Dart runtime and how it differs from the VM.

My understanding is based on Java, where we have the JDK, JRE, and JVM:

  • JVM (Java Virtual Machine): Loads, verifies, and executes Java bytecode. It's considered the interpreter or the core of Java programming.

  • JRE (Java Runtime Environment): Needed to run a Java program. It includes the JVM and core libraries but lacks development tools like a compiler.

  • JDK (Java Development Kit): Contains all tools required for compiling, debugging, and running Java programs.

(Source: IBM Blog on JVM vs JRE vs JDK)

Using this as a basis, I understand the Dart VM is akin to the JVM, translating from an intermediary representation (Dart kernel) to machine code, and capable of JIT and AOT compilation. However, I'm unclear about the exact meaning of 'runtime'.

From Introduction to Dart VM by Mraleph, I understand that the runtime or runtime system is part of the VM. The Dart Overview page states that the runtime manages memory, enforces the Dart type system, and manages isolates. On native platforms, the Dart runtime is included in self-contained executables and is part of the Dart VM provided by the dart run command.

Despite this information, I'm still uncertain about the term 'runtime'. Is it different from the 'runtime environment'? How would you define the runtime system, and how does it differ from the VM, particularly in terms of its specific functions within the VM?

Additionally, there's a discussion on the use of the terms 'Runtime', 'run-time', and 'run time' here, which was both helpful and a bit confusing.

I've tried reading about it on my own but the terms are a bit overloaded

0

There are 0 best solutions below