Artificery

Menu

  • Home
  • Archives
  • Tags
  • About
  • Warrens
  • RSS
May 16, 2017

State Pattern

Intent

Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

In short we want polymorphic dispatch.

In Clojure

We have covered polymorphism several times in other posts, so i'm to lazy to do it again:

see run time polymorphic in clojure Or mishadoff version of the State pattern in Clojure, which i 100% agree with.

Summery

Clojure supports Run time polymorphism,


Tags: Software Clojure Behavrioral Design Pattern Java

« Strategy Pattern Observer Pattern »

Copyright © 2024 Drew Verlee

Powered by Cryogen | Free Website Template by Download Website Templates