RE: Danger! Type-checking & the translator
>From Robert Craig:
>Type checking is meant to be used for catching errors,
>and for debugging. I wouldn't recommend using it as
>an integral part of your algorithm.
Ummm, it can't catch errors if it's not used, I would think...
The use of custom types is a valid way of programming, and having an
interpreter and a translator looking at the code differently is an
error, no matter how you justify it.
Ok, to type check custom types every time a value is assigned is going
to slow things down a little, so perhaps if the programmer explicitly declares
'with type_check' then it will...
Also Pete, each of your instances of
type db_error(integer s)
if
---stuff
return 1
end if
err = db_function(arg, arg2, arg3)
could be replaced with
type db_error(integer s)
if
---stuff
return 1
end if
if db_error( db_function(arg, arg2, arg3) ) end if
or something similar...
***********************************************************************
***********************************************************************
|
Not Categorized, Please Help
|
|