[Info-vax] Rust as a HS language, was: Re: Quiet?
Dan Cross
cross at spitfire.i.gajendra.net
Thu Apr 7 15:10:03 EDT 2022
In article <t2nc9n$91k$1 at dont-email.me>,
Dave Froble <davef at tsoft-inc.com> wrote:
>On 4/7/2022 1:39 PM, Simon Clubley wrote:
>> On 2022-04-07, Dave Froble <davef at tsoft-inc.com> wrote:
>>>
>>> However, back to programming, restraints can happen in multiple ways. Good
>>> programming practices are one, tools that indicate questionable code another,
>>> and of course testing.
>>>
>>
>> And programming languages that help stop you from making silly mistakes,
>> but also let you do unsafe work when needed. I posted a couple of links
>> from the Ada 95 Style Guide the other day that addresses exactly this issue.
>>
>> BTW, testing can only prove the presence of bugs and not the absence
>> of them. Someone else can still come along and do testing in a different
>> way that finds undiscovered issues. Look at the stuff about EVL that
>> I posted recently as an example.
>
>Not if all possible outcomes are expected and handled.
The exponential explosion of potential states in even simple
programs means that this is not realistic. Once multiple
threads of execution are involved, it's usually game over.
Combinatorics is something that every programmer should have
some working knowledge of.
Simply put, the _only_ thing that tests can show is that a
given program works as expected for some set of inputs in the
highly controlled and constrained testing environment. That's
extremely useful, and programmers should write tests liberally,
but it is not proof of correctness.
Contrast this with a langauge that simply won't allow you to
express a program that exhibits a certain class of problem.
>A good design will include handling all possible outcomes. Anything else is
>just when, not if, something unexpected occurs.
Testing isn't a great way to ensure this.
- Dan C.
More information about the Info-vax
mailing list