One possible vision...

Create a framework that makes it possible to write the refactoring logic in Ruby.
  • The work of creating the refactorings can be shared throughout the Ruby community
  • Each piece of refactoring code can be a "work in progress" with its own versioning and bug fixes
  • As a bonus, the framework can be used for generalized scripting and code assist operations of all kinds
<< >>



Comments. My basic idea is to distribute the work among all interested parties in the Ruby community. Why? Because no one person is capable of doing all the work in a reasonable length of time. Even a small team would take too long, and the task would be too daunting.

But if we can put a common framework in place, an API visible to any script operating on FreeRIDE, then people can work on manageable chunks. The thirty or more common refactorings can each be a single script, possibly each with a separate owner/maintainer.

Bug reports, fixes, and enhancements can then be done at a finer resolution. Scripts written to the common API can be shared via mailing list, email, and wiki.

And therein lies another benefit. The API need not be used solely for automatic refactoring purposes. Any kind of scriptable operation or code-assist feature could be implemented in this way. For example, I frequently find that I want to convert an if-modifier to a full-fledged if/else statement. This operation could be coded as a script and associated with a menu item or a button.

Additionally, this kind of script could be used to insert code templates or commonly used text; or to find matching tokens (begin/end, do/end, def/end, and so on); or any number of other features.

Think of it this way: What if FreeRIDE were easily scriptable in Ruby, just as emacs is scriptable in Lisp?