"Niklas Holsti" wrote in message news:av4r5qFitfiU1@mid.individual.net... > On 13-05-10 06:29 , Yannick Duch�ne (Hibou57) wrote: >> Le Fri, 10 May 2013 00:19:14 +0200, Randy Brukardt > ... >>> Yes, because we need to move beyond typing to other forms of static >>> error >>> detection. Typing is too rigid to do a good job -- you need to include >>> statically known information about the contents of variables and >>> parameters, >>> which can change from line-to-line in a program. >> >> I feel the same. I often though typing can't do everything if it comes >> with value type checking, while in some occasions, I tried to express >> each validity condition with types and then type checking (that ends to >> be crazy, indeed). A simple example, is paired invocation, where >> whenever a sub-program is is invoked, sooner or later, another >> sub-program must be invoked too on the same argument, ex. like `Open` >> and later `Close`. This cannot be expressed with types and indeed >> requires assertions. > > Are you familiar with the "typestate" concept? As I understand it, the > intent is to check state-sequence rules such as Open-followed-by-Close. > See http://en.wikipedia.org/wiki/Typestate_analysis. Thanks for the reference. I doubted that the idea was new (there are no new ideas), but I hadn't heard of it before. I don't like the name much, because it feeds into the "type is everything" madness that Dmitry exhibits so clearly. This clearly (just like constraints and predicates) is something that's added in addition to type analysis; it's not part of it at all. Randy.