On Feb 29, 7:45 pm, Clifford Heath <n... / spam.please.net> wrote: > Trans wrote: > > FACETS DOES NOT OVERRIDE ANY BUILT-IN METHODS. > > I enjoy using Facets, Thanks. > but it does cause problems in combination > with other common frameworks, particularly Rails. It'd be really > good to see some effort being put to getting common behaviors for > methods provided by commonly-used frameworks. It's not really > enough just to avoid modifying the built-ins. > > Someone I helped recently had tried to use Treetop (which uses > Facets) with Rails, and I think it was that works differently. > I found that the size of the collision was very small because > Treetop doesn't use many Facets methods, but in the case of wider > collisions, it could have been very awkward. I do put in effort to get Facets to not collide with ActiveSupport. But being one person --and only an occasional Rails user, it's rather difficult to catch everything. Moreover, ActiveSupport is squarely geared toward Rails, which means many of the extensions are just Railisms. Take for instance #camelcase. In Rails that not only converts a snakecase string to camelcase, but will replace '::' with '/' for the sake of creating pathnames out of class names. Understandable for use by ActiveRecord, but is that what any one thinks of as camel-casing? Not really. A better name for Rails version would be #pathize IMHO. But I have no control over that. While this is a rather minor case, for any given case I have to weigh whether it is better to stay compatible with ActiveSupport or not. That's the thing really. With Facets I have to look toward total generality -- considering what would probably work best for any Ruby program, including Rails. ActiveSupport's doesn't have a reciprocal focus. > It's nice when everything just works, so framework authors should > try for compatibility with other frameworks. Perhaps there's a > case to be made for operating a registry/catalog of core class > extensions made by frameworks that wish to remain compatible? That's an interesting idea for sure. I've considered progressing Facets in that direction for a while. But it's a fairly big job and one has to ask if its really worth the effort. It might just be better if more people would contribute to Facets, since that would largely have the same effect. T.