This document may be obsolete, please double-check against the review containing the current version and, if it exists, the version in the SDK repository.
Author: eernst@.
Version: 0.4 (2018-08-14).
// ---------------------------------------------------------------------- | |
// Basic example, hypothetical code only. | |
// typeclass Index<inout X, in Y> { | |
// X X.operator [](Y y); | |
// } | |
// instance Index<int, int> { | |
// int int.operator [](int y) => this + y; | |
// } |
// define an example struct, make it printable | |
#[derive(Debug)] | |
struct Foo; | |
// an example trait | |
trait Bar { | |
fn baz(&self); | |
} | |
// implement the trait for Foo |
/* | |
Several examples, separated by '-----' lines. | |
We probably want to use a regular type variable declaration list plus | |
a constraint specification list (to request a dispatcher object for a | |
specific typeclass instance), so I'm using `where` clauses in various | |
headers. | |
Dispatcher objects are holders of functions, and there is no particular | |
notion of a receiver, so we're likely to benefit _greatly_ from sound |
void main() { | |
AnimatedContainer( | |
SizedBox( | |
height: 57, | |
Row([ | |
if (widget.icon != null) | |
SizedBox(height: 29, width: 29, widget.icon), | |
Expanded( | |
Column([ | |
const SizedBox(height: 8.5), |
abstract class Person { | |
String name; | |
String address; | |
} | |
class DelegatorPerson implements Person { | |
DelegateePerson delegatee; | |
DelegatorPerson(this.delegatee); | |
String get name => delegatee.name(this); | |
set name(String value) => delegatee.nameSet(this, value); |
main() { | |
new Dog().feed("some food"); | |
} | |
abstract class Pet { | |
void feed(String food); | |
void pet(); | |
} | |
class Dog = Pet with FeedableDog, PettableDog; |
This document may be obsolete, please double-check against the review containing the current version and, if it exists, the version in the SDK repository.
Author: eernst@.
Version: 0.4 (2018-08-14).
________ running '/usr/bin/python sdk/tools/generate_buildfiles.py' in '/usr/local/google/home/eernst/devel/dart/work' | |
Command failed: /usr/local/google/home/eernst/devel/dart/work/sdk/buildtools/linux-x64/gn gen out/DebugIA32 --args=dart_zlib_path="//runtime/bin/zlib" exclude_kernel_service=false is_product=false dart_runtime_mode="develop" dart_stripped_binary="exe.stripped/dart" use_goma=false dart_platform_sdk=false dart_use_wheezy_sysroot=true is_msan=false is_release=false is_clang=true dart_target_arch="ia32" dart_use_tcmalloc=true goma_dir="None" dart_debug=true host_cpu="x86" dart_snapshot_kind="script" is_tsan=false target_os="linux" dart_use_fallback_root_certificates=true target_cpu="x86" is_asan=false is_debug=true | |
output: ERROR at //build/dart/dart_action.gni:232:11: Assignment had no effect. | |
"$_dart_root/tools/sdks/dart-sdk/bin/snapshots/kernel-service.dart.snapshot" | |
^--------------------------------------------------------------------------- | |
You set the variable "dfe" here |
This document may be obsolete, or it may be a proposed new version; if in doubt please consider the version in the SDK repository (which may not yet exist).
Owner: eernst@
Status: Under discussion.
bool b = false; | |
void doWork(int i) => print("Do work ($i)"); | |
void bailOut(int i) => print("Bail out ($i)"); | |
void acquire() => print("Acquire the resource"); | |
void release() => print("Release the resource"); | |
// Consider: We want to simplify the following control flow. |