1단계. 다트 언어 마스터하기

01. 다트 입문하기

다트

AOT JIT
– Class loading prevents method inlining + Can use aggressive method inlining
– No runtime bytecode generation + Can use runtime bytecode generation
– Reflection is complicated + Reflection is (relatively) simple
– Unable to use speculative optimizations + Can use speculative optimizations
– Overall performance will typically be lower + Overall performance will typically be higher
+ Full speed from the start – Requires warmup time
+ No CPU overhead to compile code at runtime – CPU overhead to compile code at runtime

DartPad

DartPad

문법

var name = 'hi';
name = 'bye';
name = 1; // compilation failed

dynamic age = 1;
age = '초등학교 5학년'; // success

final String name = 'hi';
name = 'bye'; // error
name = 'hi'; // error

const String name = 'hi';
name = 'bye'; // error
name = 'hi'; // error