Fireship · @fireship
Dart in 100 Seconds
Uploaded October 13, 2021 · Length 2:31
Summary
Dart language basics, features, and use cases for building fast apps on multiple platforms.
- dart programming language
- flutter framework
- typesafe language
- general purpose language
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
Dart a typesafe general purpose
- 0:02
programming language designed for
- 0:03
building fast apps on multiple platforms
- 0:06
it was developed by Google and first
- 0:08
appeared in 2011 and was intended to be
- 0:10
an alternative to JavaScript by shipping
- 0:12
its own virtual machine to run apps in
- 0:14
the browser but things got off to a
- 0:16
rocky start and it was never really
- 0:17
embraced by the web development
- 0:19
Community however it bounced back in a
- 0:21
big way after being adopted by the
- 0:23
flutter framework and today it's one of
- 0:25
the most loved programming languages in
- 0:26
the industry it's Unique for its ability
- 0:28
to compile to multiple tar targets like
- 0:30
arm and x64 machine code for mobile
- 0:32
devices JavaScript for web browsers and
- 0:35
self-contained executables for Windows
- 0:38
Mac OS and Linux it also has a just in
- 0:41
time or jit compiler which compiles your
- 0:43
source code to machine code on the Fly
- 0:45
which can boost developer productivity
- 0:47
with features like hot reload and
- 0:48
flutter all dark code runs inside of an
- 0:50
isolate which is like a chunk of memory
- 0:52
running a single-threaded event Loop
- 0:54
this makes it possible to perform
- 0:56
asynchronous background work on a single
- 0:57
thread but you can also spawn multiple
- 1:00
lets to run code in parallel the
- 1:02
language itself is type safe which means
- 1:04
that a variable's value always matches
- 1:06
its static type and that generally
- 1:08
results in fewer runtime errors for your
- 1:09
app in production however the type
- 1:11
system is flexible allowing you to use
- 1:13
Dynamic types and runtime checks when
- 1:15
required it also provides null safety
- 1:17
which means that values can't be null
- 1:19
unless you explicitly allow them to be
- 1:21
which can further cut down runtime
- 1:23
exceptions syntactically it's often
- 1:25
described as combining elements of java
- 1:28
and JavaScript a DART program program
- 1:30
always starts with a main function that
- 1:32
has no return value so it's annotated
- 1:34
with the void type inside of it we might
- 1:36
declare a variable with VAR and set it
- 1:38
equal to a string Dart will
- 1:39
automatically infer this as a string
- 1:41
type however we could explicitly type it
- 1:43
by replacing bar anything you can store
- 1:45
in a variable is an object and every
- 1:47
object is an instance of a class the
- 1:50
only thing that's not an object in Dart
- 1:51
is null this opens the door to multiple
- 1:54
programming paradigms functions are also
- 1:56
first class objects which means they can
- 1:58
be passed around for functional program


