comp.lang.ada
 help / color / mirror / Atom feed
From: Paul Rubin <no.email@nospam.invalid>
Subject: Re: Implicit actions & program correctness
Date: Tue, 26 May 2020 02:55:14 -0700
Date: 2020-05-26T02:55:14-07:00	[thread overview]
Message-ID: <87pnar9g1p.fsf@nightsong.com> (raw)
In-Reply-To: hj43d9F2cl7U1@mid.individual.net

Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>> and return three maybe-empty wrapper objects containing the new state.
> That, of course, is basically a run-time check

I thought about it a little bit more and got rid of the wrappers, which
were ugly.  I'll post some Haskell code illustrating the idea if anyone
wants to see it.  But, even with the wrappers, it is a compile time
check in the sense that you have to extract the suitably typed board
state from the wrapper, before you can call the API function that
requires an arg of that type.  Thus, there is a compile time guarantee
that you can't call the API function with an illegal state.  That is
all that was asked for.

  reply	other threads:[~2020-05-26  9:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 17:45 Implicit actions & program correctness deadhacker
2020-05-15 17:55 ` deadhacker
2020-05-15 18:27 ` Nasser M. Abbasi
2020-05-15 19:01 ` Paul Rubin
2020-05-15 19:03 ` Jeffrey R. Carter
2020-05-15 20:13   ` deadhacker
2020-05-15 22:09     ` Paul Rubin
2020-05-25 20:15       ` deadhacker
2020-05-25 20:36         ` Niklas Holsti
2020-05-25 22:31         ` Paul Rubin
2020-05-26  8:47           ` Niklas Holsti
2020-05-26  9:55             ` Paul Rubin [this message]
2020-05-16 13:52     ` Brian Drummond
2020-05-16 10:10 ` Niklas Holsti
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox