Re:Using the Specification Pattern to Build a Data-Driven Ru...
by pacala on Tuesday March 24, 2020 @12:40PM
(#22676118)
Feeling cranky today, lockdown and everything. This is an elementary interpreter, clumsily implemented because of all the object oriented cruft.
[ Parent
| on HN ]
Re:Using the Specification Pattern to Build a Data-Driven Ru...
by agentultra on Tuesday March 24, 2020 @01:20PM
(#22676541)
Indeed... in Haskell this can be implemented with a GADT and an evaluator which is really easy to express.
Still useful to know the "pattern" regardless of OOP cruft, Javascript prototypes, or Haskell data types.