
Extension Methods for Ruby - raganwald
http://github.com/raganwald/rewrite_rails/blob/master/doc/extension_methods.md#readme
======
_pius
Is RewriteRails affected by the recent ParseTree EOL?

~~~
raganwald
Yes, and furthermore a much more serious problem is the lack of interest in
AST manipulation/syntactic meta-programming in Ruby culture. For some strange
reason languages like Groovy started way behind Ruby but their core teams have
shown a lot more interest in meaningfully evolving their languages.

One of the reasons I write stuff like this is so that people realize that we
do have an alternative to the current dominant monkey-patching culture. That
way, instead of saying "If we had X, we might be able to do Y," we can now
say, "If we don't support syntactic meta-programming, we will lose extension
methods."

All that being said, I will be porting Rewrite to Ruby_parser. One of the
reasons I switched from block-scoped rewriting to file-based rewriting was in
anticipation that Ruby 1.9 would not support AST introspection, and sadly my
fears were realized.

~~~
batasrki
What is the reason for 1.9 not supporting AST introspection? I mean, it's
supposed to be the evolution of the current language, so this lack of support
is a bit confusing.

~~~
raganwald
It has some spotty support, I understand there is a "Ripper" gem that is in
development, but basically 1.9.1 is an interim release that was really aimed
at addressing certain performance issues and places where MRI 1.8.x is really
broken/inconsistent.

A lot of other stuff was pushed right off the table to get it done. AFAIC, the
only way to make sure it gets back on the table for future releases is to join
folks like zenspider in working with the AST and showing how important it is
for a language to be state-of-the-art for 1977 and expose its AST to
introspection.

Thus, my work on Rewriting is a not-so-subtle way to campaign for progress in
the interpreter :-)

