Re: [opencog-dev] Handle validity test

2017-01-19 Thread 'Nil Geisweiller' via opencog
Thanks, I have updated the wiki accordingly http://wiki.opencog.org/w/Development_standards#Handle_validity_test Nil On 01/19/2017 11:50 PM, Linas Vepstas wrote: I believe that they are now strictly equivalent, although that was not the case half a year ago. Back when handles held UUID's, the

Re: [opencog-dev] Handle validity test

2017-01-19 Thread Linas Vepstas
I believe that they are now strictly equivalent, although that was not the case half a year ago. Back when handles held UUID's, then a handle could be a null pointer, but holding a valid UUID. and vice-versa -- a pointer could be non-null, but the UUID invalid. Resolving the one form into the oth

[opencog-dev] Handle validity test

2017-01-19 Thread 'Nil Geisweiller' via opencog
Hi, we have multiple ways to test whether a Handle is valid. I've encountered the followings 1. if (h) then ... 2. if (h != nullptr) then ... 3. if (h.is_defined()) then ... 4. if (h != Handle::UNDEFINED) then ... there might be more but that's the ones I can recall. First question: Are t