Static typing, Python, D, DbC

Alf P. Steinbach /Usenet alf.p.steinbach+usenet at gmail.com
Mon Sep 13 00:46:48 EDT 2010


* Paul Rubin, on 13.09.2010 04:50:
> Ed Keith<e_d_k at yahoo.com> writes:
>>> I think DbC as envisioned by the Eiffel guy...
>>> the term is that it's a static verification technique,
>>>> Eiffel throws an exception when a contract is violated. That is run
>> time behavior, not static verification.
>> The runtime checks are for when static analysis hasn't been supplied
> (that is usually a partly manual process). DBC is always intended to be
> statically verified as I understand it. Doing it at runtime is just a
> hackish fallback.

DBC can't in generally be statically checked. E.g. a precondition of a routine 
might be that its argument is a sorted array. So regarding the nature of the 
checks it's not hopelessly incompatible with Python.
Cheers,
- Alf
-- 
blog at <url: http://alfps.wordpress.com>


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /