Thanks Ryan. I have 3 few follow-up questions if you have time:
> What does it mean to make your library -w clean?
A number of specific things:
+ Methods aren't redefined accidentally.
+ Variables are initialized before they're used.
+ Variables (all sorts) are used at least once after initialization.
+ Variables (all sorts) don't shadow outer variables.
+ Regexps have clean ranges & escapes.
+ Format strings match their args.
There might be more. I'm tired and don't remember.
> What are the benefits/drawbacks of doing so?
The benefits should be pretty clear:
+ I can use your library in my app and my tests will still run clean with -w (which means MY code can be -w). IOW, nobody is pissing in the public pool.
+ You get certain assurances about a library that you know is warning free: instance variables are assigned before being used, block variables aren't shadowing, code has been cleaned up and/or typos are fixed, etc... IOW, the author(s) cared about and paid attention to the design and quality of their code.
+ A warning-free library is a better ruby citizen.
The drawbacks?
Honestly, I don't care. I'll pay the price to put out cleaner code. I think it is well worth it.
Some have claimed that there are speed benefits to writing sloppier code. I have yet to see anything truly rigorous and definitive.
> I would like start contributing to OS, and your warningfree project looks like something I might be interested in. I might need a little guidance to get started. (I consider myself to be an advanced beginner/competent Rubyist (http://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisition\).) Do you think this might be something I could help out with?
Fixing up messy libraries is pretty tedious and doesn't teach much as a skill (other than what not to do). It does provide the ability to read through some popular libraries and study their guts... So that really depends on what you're looking for.
···
On Jun 24, 2014, at 0:37, Adam Wenham <adamwenham64@gmail.com> wrote: