[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strong Typing, Dynamic Languages, What to do?

Oscar and everyone else ... 

there is no way to make cast-free C++ a safe language w/o changing the
language radically. Here is what I mean:

1. I need a decision algorithm for C++ standard programs 

2. I need an algorithm that checks the type checking rules. 
   For such things as vector-refs or whatever, the type checker 
   may insert run-time checks when feasible and necessary to accomplish 3. 

3. At run-time, the evaluation of an expression of type T yields an object
   of type S where S is a sub-type of T. For every base type, you get
   something of that type. 

I claim that this trinity doesn't exist for plain C++. 

There is probably a mathematical proof. I just dont' care to deliver. 

Practically speaking, if it existed, Java would not have had the chance of
a snowflake in hell.

-- Matthias