[V4MD] pointer at the same table by binary_link

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Sep 16 19:29:11 CDT 2005


On 9/16/05 4:24 PM, "Sims, John" <ayu8 at cdc.gov> wrote:

> Ruslan,
> 
> I believe we had this dicussion before.  I believe you must consider the
> intention in these situations.  When linking 2 records, the intention is
> to have the 2 records linked together.  If they are already linked
> together, then your intention is already met and Valentina should just
> continue on.  If you unlink 2 records, the intention is to not have the
> 2 records linked together.  If the 2 records were never linked in the
> first place, then your intention is already met and Valentina should
> just continue on.

So you vote for NOT-throwing error here ?
 
I not agree John.

Look e.g. How works API of any OS when you try to open file which is already
opened. Or close already closed file. OS return you error.

If you try marry already married people then you have some logical mistake.
Before you marry them government at first make sure that both are NOT
married at all on this moment. Right ?

> I believe that throwing errors in the situation where you are trying to
> link 2 records that are already linked or trying to unlink 2 records
> that were never linked in the first place is going to result in a lot of
> error handler overhead that will be just there just to trap the error
> and move on.  

> I thought this was the reason you created Link.LinkExists
> for situation where developers wanted to check for the link before
> proceding...
> 
> If myLink.LinkExists(a,b) Then
> msgBox("Link Exists")
> Else
> myLink.LinkRecords(a,b)
> End if

Absolutely right !
 
> MUCH!!!! Faster resulting application than one that uses Error Handlers.

You worry that exception will slow down your app ?
But if you have check that link not exists you will NOT get exception.

And at least in C++ world, try - catch() block
Do not slow down app at all until exception happens.

So you can write:

try 
 If myLink.LinkExists(a,b) Then
 msgBox("Link Exists")
 Else
 myLink.LinkRecords(a,b)
 End if
catch
  ...
end

With no problems...


> Sorry I am late to the discussion, I was out of town.
> -My 2 cents

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina-beta mailing list