Re: Object-relational impedence

From: S Perryman <>
Date: Thu, 06 Mar 2008 09:39:54 +0000
Message-ID: <fqoe5t$f3r$>

Robert Martin wrote:

> On 2008-03-05 03:24:37 -0600, S Perryman <> said:

 >> Robert Martin wrote:

 >>> You are confusing OO with static typing. In OO languages like Ruby,
 >>> Python, or Smalltalk you can pass any object to any function
 >>> irrespective of type.

 >> And you (both) are equating the (strong) typing model of Simula as the  >> only strong typing model.

> You presume too much.

> Type inferrence can be nearly as flexible as dynamic typing.

  1. Type inferencing is *strongly-typed* .

All the process does is construct the effective type on behalf of the programmer. The type system makes no distinctions between type-checking of an inferred or manifestly-declared type (static or otherwise) .

2. The only thing that *weakly-typed* type systems (ie those for which variables, input/output parameters etc have no evident type - which is actually what most mean by "dynamic typing" ) allow, which strongly-typed type systems do not, is the following :


     T.op1() ;
     if(some-condition) { T.op2() ; }


Most strongly-typed systems will require T (or any type substitutable with T) to possess both the op1 and op2 properties in order for an invocation of op to be allowed (***) .

A weakly-typed system does not care, because all usage of non-existent properties on a type results in runtime failure at the point of use.

  • Of course, tis a simple matter for a strongly-typed system to infer the conditional usage of op2, and generate a "caveat emptor" warning for any usage of op where the type of the T instance used does not possess the op2 property.

Steven Perryman Received on Thu Mar 06 2008 - 10:39:54 CET

Original text of this message