Sujet : Re: GIMP 3.0.0-RC1
De : commodorejohn (at) *nospam* gmail.com (John Ames)
Groupes : comp.os.linux.misc comp.os.linux.advocacyDate : 12. Feb 2025, 17:17:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250212081704.00003ce1@gmail.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
User-Agent : Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32)
On Tue, 11 Feb 2025 23:29:43 -0500
"
WokieSux282@ud0s4.net" <
WokieSux283@ud0s4.net> wrote:
Nothing wrong, or unique, about fixed-size arrays. You don't want
them for some stuff, do want them for other stuff. CAN elim a lot of
range-checking code.
Nothing wrong with fixed-size arrays as a general concept, no. Treating
the size as *part of the type specification* so that passing ARRAY
[1..15] OF CHAR to a function expecting ARRAY [1..10] OF CHAR yields a
type mismatch is what's utterly demented; a true Wirth original, that.
I have never yet heard a sensible case made for a language where array
sizes are known, but no FOR EACH IN (x) construct is provided. Doing it
C's way at least offers you flexibility and performance in exchange for
the risk of shooting yourself in the foot; offering a way to iterate
transparently across arrays of arbitrary size at least gives you safety
and convenience in exchange for the performance penalty of bounds-
checking. Wirth's approach offers the worst of both worlds, for no
material gain whatsoever - absolutely bonkers.