AOP
JavaScript 没有 AspectJ 式的编译期织入:装饰器、Proxy、中间件、猴子补丁与运行时插桩各自负责一段横切逻辑,选型的核心是织入时机、执行顺序与不能破坏的不变量。
JavaScript 没有 AspectJ 式的编译期织入:装饰器、Proxy、中间件、猴子补丁与运行时插桩各自负责一段横切逻辑,选型的核心是织入时机、执行顺序与不能破坏的不变量。
The event loop and its task queues, Promise states and combinators, async and await sequencing, timers and cancellation, and the worker and backpressure boundaries.
JavaScript 的心智模型:单线程调用栈、动态类型、原型委托与宿主事件循环。本页只回答“是什么、边界在哪”,机制细节和用法交给兄弟页。
同一个线程上交错推进任务与真正并行是两件不同的事:事件循环的阶段与队列决定执行顺序,Worker、子进程、共享内存与背压决定能否把 CPU 工作搬出主线程。
Node core modules as a surface: fs in three styles, Buffer, streams and backpressure, HTTP and net, worker threads, child processes, and the errno conventions that carry through.
The Error family, throw and try semantics with cause chains, ESM static linking and live bindings, CJS interop, and the circular-dependency and dual-package failures that follow.
Functions as first-class values: declaration forms, parameters, lexical scope, hoisting and the temporal dead zone, closures, and the four rules that fix this at call time.
Objects as property bags: descriptors, getters, the prototype chain, class syntax, private fields, Symbol keys, and the Proxy and Reflect pair that intercepts every operation.
Node.js on V8 and libuv: the event loop, the thread pool and the boundary between JavaScript and the OS.
The eight runtime types, the conversion and equality algorithms that connect them, numeric and string precision, and the expression and statement forms that produce them.
Arrays, typed arrays, Map, Set and the weak variants, the iterator and generator protocols that unify them, and the traversal forms whose differences decide correctness.