Wednesday, October 22, 2008

Mixins and Spreadsheets

It just occurred to me that mixins (such as seen in Scala, Fan, Ruby, or many other languages) and everyday spreadsheets have a lot in common. I tend to prefer C#-style static extension methods. Keeps things cleaner and leaner in my opinion, but it doesn't give you the chance to have tons of default-implemented-yet-still-customizable behavior.

Mixins do provide that. And it occurred to me that's a lot like spreadsheets. You can have a lot of cells that "inherit" functionality via the drag operation, but you can customize individual cells on the fly. Not each one has to be just like the other.

Not a perfect analogy, but I think there's some value in considering the relationship.

No comments:

Post a Comment