// guess the programming language of the day

$ whois dart

Dart

first released in 2011 · by Lars Bak, Kasper Lund

$ guessprog --inspect dart

year
2011
paradigm
object oriented
family
c like
memory
automatic gc
binding
static
safety
strong

DART(7)

AUTHORS
Lars Bak, Kasper Lund
HISTORY
Dart was created at Google by Lars Bak and Kasper Lund, veterans of the V8 JavaScript engine, and unveiled at the GOTO conference in Aarhus, Denmark, in October 2011. Google initially pitched it as a structured alternative to JavaScript, with plans to ship a Dart virtual machine inside Chrome. Those plans were dropped in 2015 and Dart found a second life as the language of the Flutter UI toolkit. Dart 2 brought a sound static type system, and Dart 3 made sound null safety mandatory.
USAGE
Dart is used almost entirely through Flutter, Google's toolkit for building mobile, desktop and web apps from a single codebase. Outside the Flutter ecosystem it sees little use.
SEE ALSO
Dart on Wikipedia ↗
$ cat point.dart
class Point {
  final double x, y;
  const Point(this.x, this.y);

  Point operator +(Point other) => Point(x + other.x, y + other.y);

  @override
  String toString() => '($x, $y)';
}

void main() {
  final points = [const Point(1, 2), const Point(3, 4)];
  String? label; // nullable: must be checked before use
  print('${label ?? 'sum'}: ${points.reduce((a, b) => a + b)}');
}