David Douthitt wrote: > Ruby is nice and provides some nice features for those tripping and > bumbling in from procedural programming languages. > > Could Ruby provide some sort of a "strict-OOP" mode which would force > one NOT to use all those "hidden" features and to use the real OOP > power of Ruby instead? Some things that could be flagged or rejected > would be: > > * method definition outside a class (which would normally be class > * Object) no function calls (only method calls) self is required > * rather than assumed > > Or is this idea not useful...? Or is this idea better for a ruby-lint > program? This might not be an either/or sort of thing. For instance, Perl allows you to include a diagnostics module which gives you extended warnings and diagnostics. In the Ruby spirit of "there are better ways to do it", this might be generalized by having a Ruby option that yielded an XML stream representing Ruby's parse tree (and error info in the case of parse errors), which could be used by smart checking modules. Then in addition to a strict diagnostics module, other browser/IDE-related modules could intelligently highlight/colorize troublesome usage, suggest reasonable alternatives in some cases, and so on. Conrad Schneiker (The opinions in this note are unofficial and subject to improvement without notice.)