Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please explain YouAreDaChef reference (and vilification) #83

Open
loren-osborn opened this issue Jun 29, 2014 · 1 comment
Open

Please explain YouAreDaChef reference (and vilification) #83

loren-osborn opened this issue Jun 29, 2014 · 1 comment

Comments

@loren-osborn
Copy link

Reg,

I was relatively unsurprised when I first saw you describe YouAreDaChef as a "vile creation". I've long known JavaScript bestowed plenty of power to library authors to shoot themselves in the foot in the code interoperation department. I was only surprised when I looked up YouAreDaChef, and discovered that you are its project leader and primary developer. Can you please explain what differentiates YouAreDaChef from allong.es, what about YouAreDaChef's approach makes it so "vile", and what you would have done differently with YouAreDaChef had you been designing it today?

Thanks,

-Loren Osborn

P.S. The comment I'm referring to is at the bottom of https://github.com/raganwald/javascript-allonge/blob/master/manuscript/markdown/Instances%20and%20Classes/class.md

@raganwald
Copy link
Owner

I was being sarcastic. Somewhat. YouAreDaChef "greenspuns" fairly sophisticated aspect-oriented programming into JavaScript, but in doing so, it kind of "takes over" the way you use prototypes and method definitions.

In Ruby, Rails does a similar thing with its method lifecycles for models. No other class allows you to write things like after_save :write_announcement_to_log.

Is that a good thing or a bad thing? Well, it can be a very good thing in limited contexts. For example, if you are writing a framework (OSS or internal), and want to allow programmers to patch in extra behaviour on top of the classes you provide, YouAreDaChef might be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants