From: Matt Pattison Date: 2005-10-03T16:30:17+09:00 Subject: Re: Large Ruby Apps ? On 10/2/05, Eivind Eklund wrote: > On 9/30/05, Leonardo Eloy wrote: > > I agree that some sort of static analysis would allow Ruby codes to more > > tightly immune to "bugs" (as Seltzer said). > > > > But the nature of Ruby's dynamism wouldn't allow that any sort of effort in > > this area will work properly, > > I believe this is incorrect. It should be possible to do a lot of > static analysis in Ruby, it's just that there is some type inference > etc that needs to be done first, and that is a significant amount of > work to implement. > > An oldish reference that cover this fairly well is Ole Agesen's PhD > thesis "Concrete Type Inference: Delivering Object-Oriented > Applications" (available from > http://research.sun.com/techrep/1996/abstract-52.html) > > That reference is based on work done in the language Self, which is > prototype based, and contains the same challenges as (pure) Ruby. > Things get much more complex if C is thrown into the mix, of course. A much more recent example of this sort of type inference inference, for a subset of Python, is Shed Skin: http://shed-skin.blogspot.com http://shedskin.sourceforge.net It is a Master's Thesis and a Google Summer of Code project. It uses Ole Agesen's Cartesian Product Algorithm, combined with what the author calls "iterative object contour splitting", and converts straightforward python code directly into C++ using type inference, resulting in a ~ 10x speed up. The guy seems to know what he's talking about, maybe some of these ideas could be transferrable to an experimental, type inferring Ruby? Matt Pattison