Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stephen Fuld Newsgroups: comp.arch Subject: Re: is Vax addressing sane today Date: Wed, 25 Sep 2024 09:54:17 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <2024Sep6.080535@mips.complang.tuwien.ac.at> <2024Sep8.155511@mips.complang.tuwien.ac.at> <73c6d21457c487c61051ec52fe25ea5d@www.novabbs.org> <09ce1622b872f0b0fa944e868a8c97be@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 25 Sep 2024 18:54:17 +0200 (CEST) Injection-Info: dont-email.me; posting-host="712df838b41f4ba9af5c9561f5afb4e2"; logging-data="2740621"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19j8Opiegj9zC79ShpSJMU5RtxsiAAPClE=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:6D1vmh719ZCFehicuZCEl6faCHg= In-Reply-To: Content-Language: en-US Bytes: 2432 On 9/10/2024 1:13 AM, Niklas Holsti wrote: > In the Ada case, the ability to declare array types with programmer- > chosen index types with bounded range, such as range-bounded integers or > enumerations, means that the compiler can avoid indexing checks when the > (sub)type of the index is known at compile time to fit within the index > range of the array. I have always liked the idea of variable ranges able to be specified in the language. Besides the advantages you mentioned, it provides more human "comprehensibility" (if the ranges are reasonably named) i.e. better internal documentation, and it makes responding to specification changes required later in the program life cycle easier and less error prone, i.e. if the range has to change, you change it in one place and don't risk missing making the change in some obscure part of the program you forgot about. -- - Stephen Fuld (e-mail address disguised to prevent spam)