Hello Robert,

Wednesday, December 24, 2003, 2:02:11 PM, you wrote:


RMM> On Tue, 23 Dec 2003 21:54:19 +0300, Konstantin Knizhnik 
RMM> <[EMAIL PROTECTED]> wrote:

>> Sorry, stupid bug in storage close method ("func" keyword was missed)
>> cause that problem: database was not closed and so could not be
>> reopened. The language constructions should be more protected from
>> errors:)

>>> ? protect
RMM> USAGE:
RMM>      PROTECT value

RMM> DESCRIPTION:
RMM>       Protect a word or block to prevent from being modified.
RMM>       PROTECT is a native value.

RMM> ARGUMENTS:
RMM>       value -- The word or block of words to be protected (Type: word block)


It looks like I should know where I am going to make a bug to use
protect construction:)
Also PROTECT will not help in my case:

make object! [
    close: ["close database"] [dybase_close db]
]

Which word do you want to protect? "close"?
It has to be defined...

The bug is that word "func" is missed, so instead of method definition
this code is treated by Rebol as initialization of "close" field with
block ["close database"]. What compiler does with second block is not
clear to me, I think it was just skipped.
This bug seems to be similar with classical fortran bug "DO I=1.10"
which cause crash of satellite.

That is why I said that language should be less error prone.
It can be less flexible, require redundant definitions, but it should
be safe and be able to catch at compiler time as many bugs as
possible. Certainly I am not experience Rebol user and that is why i
doing such stupid mistyping (like this or "hash append value")
But fro my point of view, compiler should be able to detect such
bugs..


RMM> What speed improvements have you achieved by this step? Robert

In testindex example insertion and sreach speed is also not changed.
But if you do not reset object hash each 100th iteration, then remove
speed is increased about 10 times.

-- 
Best regards,
 Konstantin                            mailto:[EMAIL PROTECTED]

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to