diff --git a/README.md b/README.md index 7512b75..c36abd7 100755 --- a/README.md +++ b/README.md @@ -8,28 +8,33 @@ object model and interfaces. This is an alternative to the ES6 `class` syntax in JavaScript and provides several advantages: -- Simple way to define instance and "class" (constructor) methods, - properties and attributes, +- Simple way to define instance and constructor methods, properties and + attributes, - Uniform and minimalistic definition syntax based on basic JavaScript object syntax, no special cases, special syntax or _"the same but slightly different"_ ways to do things, - _Transparently_ based on JavaScript's prototypical inheritance model, - Granular instance construction (a-la _Python's_ `.__new__(..)` - and `.__init__(..)` methods) + and `.__init__(..)` methods), - Simple way to define callable instances (including a-la _Python's_ - `.__call__(..)`) -- produces fully introspectable constructors/instances, i.e. no direct - way to define "private" attributes or methods. + `.__call__(..)`), +- Produces fully introspectable constructors/instances, i.e. no _direct_ + way to define "private" attributes or methods, +- Does not try to emulate constructs not present in the language (classes), - Less restrictive: - - `new` is optional - - all input components are reusable - - no artificial restrictions + - `new` is optional, + - all input components are reusable, + - no artificial restrictions. Disadvantages compared to the `class` syntax: -- No _syntactic sugar_ -- Slightly more complicated calling of `parent` (_super_) methods +- No _syntactic sugar_, +- Slightly more complicated calling of `parent` (_super_) methods. +Note that the produced constructors and objects are functionally +identical (almost) to the ones produced via ES6 classes and are +interchangeable with them. + Here is a basic comparison: