On Jul 13, 2013, at 7:23 , Igor Stasenko wrote:

> On 13 July 2013 14:47, Stéphane Ducasse <stephane.duca...@inria.fr> wrote:
>> what are the pros and cons?
>> 
> pros - you can pass is as parameter everywhere it expects a pointer
> cons - it will slow down all calls with pointer type because of extra check,
> even if you don't using it (and in most cases you don't)
> 
> i think best way is to introduce it as option.

I think there's an -optNoChecks or something already?
IMHO, it's would be nice to basically treat them as asserts; leave them on by 
default, then have a system-wide switch in case you want to disable them for 
production and gain some performance at the risk of crashes rather than 
failures in case of running into untested incorrect usage.

(Optionally with an added -optForceChecks in case you write code that depends 
on an error being thrown for incorrectly passed types… though that shouldn't 
really happen)

Cheers,
Henry

PS: Sadly, summer in Norway has seen the best weather in ages :D

Reply via email to