Robert Feldt <feldt / ce.chalmers.se> wrote: > [...] > > Text -> Ruby Object Nodes -> Ruby Visitor -> Ruby Pretty Printer > > > > Text -> Ruby Object Nodes -> Ruby Visitor -> > > * Ruby Profiler. > > * Coverage tools. > > * Debuggers. > > * Refactoring Transforms. > > * Language sensitive IDE's. > > * Analyses and metrics of how programmers program. > > >I agree with John that this would be a very promising/interesting way to >go and strongly encourage you guru's to investigate different approaches >before committing to a particular strategy for Ruby 1.8 and on. However, >note that they need not be mutually exclusive >(ie. Text -> RubyObjectNodes -> Visitor -> RubyByteCode internally and >exposing RubyObjectNodes for John's and others "back ends"). Or is >translator speed crucial/major design criteria? If Ruby is looking at the idea of having multiple back ends etc, perhaps I should throw out a "bad idea" I mentioned to the Perl folks. I should say up front, this is in many ways a bad idea. But it is an idea which I view as inevitable, and I think that there will be a definite win for the first language to do this. The bad idea is this. Have multiple front end parsers as as well. If you have well-defined RubyObjectNodes which need to be presented to the back end, and you can associate a parser with anything that could need to be evaled, then you get some very interesting capabilities. It would take some thought to do it right, but what you get is the ability to define a new language very easily, and you can easily write a translation to share both ways between the new and old languages. Why might you want to do this? Well consider the following: - Write a limited "language" that happens to read some standard configuration file format. - Create localized macro languages for a system so that (for instance) Japanese users can write instructions in something that looks like Japanese. - Allows someone to optionally add a preprocessor to Ruby. There are all sorts of bad things to be said for encouraging people to speak in incompatible ways. However many countries are at a point where the anglo-centric nature of programming is a barrier to entry. (I have heard this mentioned as a reason why you find fewer "power users" in countries that don't speak English.) So I suspect that there is an unmet need. And while there is a lot to be said for discouraging linguistic fragmentation, there is also a lot to be said for being the first to meet a widely felt need. If the desire really is there, then it is inevitable that someone, somewhere will satisfy it. And the first to do so will pick up a lot of momentum from it. Cheers, Ben _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com