Add type annotations to the Newspeak version. Switch from asserts to if-throws in Newspeak version.
More idiomatic Dart: use initializing formal parameters in constructors.