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 的心智模型由四件事组成:一个调用栈上的单线程执行、一套运行期才检查的动态类型、一条原型委托链,以及一个由宿主驱动的事件循环;JIT 分层与 ESM/CJS 并存是这套模型的补丁,TypeScript 则在编译期把类型补回来。
同一个线程上交错推进任务与真正并行是两件不同的事:事件循环的阶段与队列决定执行顺序,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.