The Observer pattern causes temporal coupling in systems with synchronous message passing. This can lead to failure in Object-Oriented systems. Asynchronous messaging avoids the pitfalls. Actor-based implementations more accurately realize the original intent of the pattern. The intent of the Observer pattern is to “define a one-to-many dependency between objects so that when one object […]
Archive for May, 2011
22
May
2011
Actors Make Better Observers
Tags: actor, asynchronous, blocking, distribution, JavaScript, listener, message-passing, observer, patterns, pub-sub, synchronous
01
May
2011
Parsing Expression Grammars, part 4
This article could probably be called “Left Recursion Considered Harmful“. PEG parsers are unambiguous and relatively easy to reason about. A little reasoning about left-recursive PEGs shows that they don’t make sense. The motivation to use left recursion seems to be driven by the desire to build left-associative parse-trees for arithmetic operators. However, parse-tree generation […]