Rob Pike 1/25/2014

Self-referential functions and the design of options

Read Original

The article details a specific design pattern in Go for handling configuration options on a type. It describes the author's journey to find a method that is clean, extensible, and pleasant to use, culminating in a solution using self-referential function types and closures to set options, including the ability to capture and return previous state.

Self-referential functions and the design of options

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week