Skip to content

Instantly share code, notes, and snippets.

@thosakwe
Created May 1, 2017 12:05
Show Gist options
  • Save thosakwe/609036a04abb06849508419bbc62438e to your computer and use it in GitHub Desktop.
Save thosakwe/609036a04abb06849508419bbc62438e to your computer and use it in GitHub Desktop.
Concurrent lang proto

The only primitives are numbers:

  • byte
  • short
  • int,
  • long,
  • double
  • float and their unsigned alternatives...

Also, bool (simple layer over numbers), array and map.

There should also be classes,

class String {
final vec<byte> chars = new vec<>();
// Property
long length {
get() => chars.size();
// set(v) { ... }
}
// Shorthand
long get length => chars.size();
}
class Todo {
String text;
bool completed;
String foo {
get() => 'foo: %text',
set(v) {
// Easy setter
this.text = v; // `this` ref unnecessary
},
set(v); // More shorthand
}
}
class Bar extends Todo {
String foo {
@override
get() => 'Override';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment