Wednesday, September 20, 2006

 

Jay Fields Thoughts: Ruby Form Template Method Using Extend

Jay Fields Thoughts: Ruby Form Template Method Using Extend

One of Ruby's feature is the introduction of 'mixin' as demonstrated by Jay's article.

I have a mix feeling about using this feature (no pun intended). To me mixin sounds too close to global function as popularized by language such as C++.

In C++ you can use this "global" function in your class with the right syntax and inclusion. Obviously one would argue what's so bad about that. In the beginning if you have small codebase maybe the drawback is not as obvious, but maintaining this type of code years from now could be hassle in my opinion.

I guess what I'm trying to say things could go out of hand quickly by incorporating this practice.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?