Re: Last Element Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message

All you really need to read of this message is. "Thank you Jeff"

        Lucius L. Hilley III - Unkmar

----- Original Message ----- 
From: <jzeitlin at cloud9.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Last Element Reference


>
>
> On Sat, 20 Sep 2003 17:02:14 -0700, Al Getz <Xaxo at aol.com> wrote:
>
> >jzeitlin at cloud9.net wrote:
>
> [deleted for bandwidth]
>

<HUMAN SNIP>
>
> >So you're telling me you dont have to check for negative
> >subscripts here:
> >s={1}
> >s=s[$-1000,$-2000]
>
> No, I'm NOT.  You absolutely have to check for negative subscripting, and
Rob has already
> included this code in the Euphoria interpreter - you will get an error if
you try to take
> s[-1].
>
> Your proposal, of allowing negative subscripts without the $, requires
significant
> internal programmatic change to the interpreter - and removes the ability
to flag an error
> if a negative subscript is encountered.  Because a negative subscript
actually would mean
> something legitimate.
>
> >The only shortcut it *really* gives is when checking "$" alone:
> >s=s[1..$]
> >but anytime something is subtracted from $ you *STILL* have
> >to check for minus subscripts.
>
> Yes, exactly - and the result of subtracting from $ still MUST be
non-negative (and may in
> fact have to be positive; I don't recall offhand whether 0 is a valid
subscript) - or
> Euphoria will signal an error condition.  Your proposal for 'bare'
negative subscripts
> _breaks_ that check.  Or rather, makes it impossible to use that check.
>

Thank you Jeff

<HUMAN SNIP>
>
> >It's not a simple matter of esthetics.  It's a matter of
> >psychology and the stress it produces.  If you have to
> >pay more attention to detail, it creates more stress.
> >The more stress, the more energy the brain uses.
> >The more energy the brain uses, the slower you debug code.
>
> I have _never_ seen such a bogus argument in my life.  Not even when it
was _clear_ that
> someone was trolling.
>

Thank you Jeff

> Programming is INHERENTLY about paying attention to detail.  If you don't
pay attention to
> detail, and get everything exactly right, how can you be sure that the
program is going to
> do what you want it to?  Hell, even _with_ that level of paying attention
to detail,
> programs still have bugs in them - and you want to introduce constructs
that will make
> bugs _less_ detectable?  Programs can't do anything except what you tell
them to - and
> they can't guess, either, and even if they could, what would you - or your
users - do if
> the computer guessed _wrong_?  Even those programs that act like you don't
have to be
> precise are only acting within their programming, and there are definite
limits to the
> imprecision available.
>

Thank you Jeff

<HUMAN SNIP>
> >Your mind is closed because you heard the phrase
> >"negative subscripts cant be detected easily"
> >and you think it applies across the board without
> >any question.
>
> And please do not resort to ad hominem attacks when others with experience
refuse to
> acknowledge your invalid views as valid.
>
> --
> Jeff Zeitlin
> jzeitlin at cyburban.com
>

Thank you Jeff

<HUMAN SNIP>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu