From: Dave Thomas Date: 2000-11-17T12:51:37+09:00 Subject: [ruby-talk:6410] Re: Dynamic languages need formal typing of public interfaces Charles Hixson writes: > Andrew Hunt wrote: > > > ... > > Now, if you could match signatures based on some sort of semantic > > description, then you'd have something. > > Can we even define the semantics of a routine (other than by the source code)? > This sounds like a DWIM language issue. We'd need some sort of higher level > meta-language. Sure, at least in some cases. For example: def sqrt(n) pre: n >= 0 post: result*result =~ n && result >= 0 (=~ means approx equal) code... end That way you know the semantics of the routine by its post condition. Dave