The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

Rubyish Dependency Injection

6 October 2004 — 1-minute read

Today, I witnessed something beautiful.

Jim Weirich let me preview an article he wrote (and which he will shortly post on his own blog) about dependency injection in Ruby. He gives a sample implementation, which I found particularly elegant, and very “rubyish”.

Jim has consented to let me use his design as the basis for the “next generation” of Copland. I’m thinking I may want to just create a whole new project, since Copland’s approach to DI is significantly different than Jim’s, and the two are not exactly compatible.

Although…it should be possible to implement Copland on top of Jim’s design… something to think about, anyway.