RubyFlow The Ruby and Rails community linklog

Get your Ruby code sweet with Zucker

Zucker is a small gem that adds syntactical sugar to Ruby :)

Install: gem install zucker Use: require 'zucker/all' More info: rubyzucker.info / introduction / source

Comments

Too much Zucker can cause bad code, also know as Zuckerberg ;-)

haha :D !

Why not contributing to ruby facets instead?

It’s a different concept than Ruby Facets. Facets tries to have solutions for everything and has gotten too big. Zucker only adds small and more generic features.

Another point is that it focuses on 1.9 (some of Facets features are not needed, because there a similar methods in 1.9)

Furthermore, there aren’t any dependencies within the gem so you can cherry-pick the additions you want.

I don’t think you characterize Facets correctly –your description sounds more like ActiveSupport. Facets has actually gotten smaller over the last year or so, and has become increasingly focused on core extensions (even more so with the upcoming release). Facets does has some method overlaps with Ruby 1.9 b/c Facets had those methods before Ruby 1.9 even existed. And to your last point, Facets invented the idea of method cherry-picking –it was actually the inspiration for the project, and to which you can still do in minute detail with only a few exceptions.

Hi trans, I really like facets and the ideas it has and uses. Some of Zucker’s features are inspired by these.

But here are my arguments:

It’s great that Facets invented some of the 1.9 features, but what I mean with “focus on 1.9” is that Zucker just does not need (or want) to implement these features.

About cherry-picking - I think in Facets you have to take look at the source code, if it has another facets dependency, before using it. This must not be bad, but it’s a different approach than Zucker.

Another point is, that Zucker is pretty small and can easily be documented.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in