#Die vielen »Talente« von JavaScript
[TOC]
##Die vielen Talente von JavaScript Rollen-orientierte Programmieransätze wie Traits und Mixins verallgemeinern zu können
###TL;DR / Abriss
| composable("composites.Array_flatten", function (require, global) { | |
| "use strict"; | |
| var | |
| environment = require("environment_extended_introspective_core"), | |
| environment_introspective = environment.introspective, |
| (function (Function) { | |
| const fctPrototype = Function.prototype; | |
| const FUNCTION_TYPE = (typeof Function); | |
| function isFunction(type) { | |
| return ( | |
| (typeof type == FUNCTION_TYPE) | |
| && (typeof type.call == FUNCTION_TYPE) | |
| && (typeof type.apply == FUNCTION_TYPE) |
| (function (Function) { | |
| const fctPrototype = Function.prototype; | |
| const FUNCTION_TYPE = (typeof Function); | |
| function isFunction(type) { | |
| return ( | |
| (typeof type == FUNCTION_TYPE) | |
| && (typeof type.call == FUNCTION_TYPE) | |
| && (typeof type.apply == FUNCTION_TYPE) |
| (function (Function) { | |
| const fctPrototype = Function.prototype; | |
| const FUNCTION_TYPE = (typeof Function); | |
| function isFunction(type) { | |
| return ( | |
| (typeof type == FUNCTION_TYPE) | |
| && (typeof type.call == FUNCTION_TYPE) | |
| && (typeof type.apply == FUNCTION_TYPE) |
| (function (Function) { | |
| const fctPrototype = Function.prototype; | |
| const FUNCTION_TYPE = (typeof Function); | |
| function isFunction(type) { | |
| return ( | |
| (typeof type == FUNCTION_TYPE) | |
| && (typeof type.call == FUNCTION_TYPE) | |
| && (typeof type.apply == FUNCTION_TYPE) |
| (function (Function) { | |
| const fctPrototype = Function.prototype; | |
| const FUNCTION_TYPE = (typeof Function); | |
| function isFunction(type) { | |
| return ( | |
| (typeof type == FUNCTION_TYPE) | |
| && (typeof type.call == FUNCTION_TYPE) | |
| && (typeof type.apply == FUNCTION_TYPE) |
| /** | |
| * | |
| * Prevent function based "Role" pattern implementations[1] like "Mixin"s, | |
| * "Trait"s or "Talent"s from getting instantiated by turning them into | |
| * callable objects. Thus creating real objects but providing [call] and | |
| * [apply] as standard call/delegation methods to them. | |
| * | |
| * The concept will be promoted as "Applicator" in order to distinguish | |
| * it from "Constructor". (Though in theirs wording both do follow the | |
| * same track.) |
#Die vielen »Talente« von JavaScript
[TOC]
##Die vielen Talente von JavaScript Rollen-orientierte Programmieransätze wie Traits und Mixins verallgemeinern zu können
###TL;DR / Abriss
#The many »Talents« of JavaScript
[TOC]
##The many talents of JavaScript for generalizing Role Oriented Programming approaches like Traits and Mixins
###TL;DR / Summary
roughly sketched
Function.prototype.before, Function.prototype.after, Function.prototype.around as minimal set of a kind of an AOP base that already supports library / framework agnostic modification of function based control flow by just wrapping additional behaviors / advice handlers around existing methods / functions.Joinpoint, Pointcut, Advice, Aspect; especially from this point of view of what makes them distinct from existing approaches in compiled and/or non dynamic and/or non functional programming languages.