From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: A function that cannot be called?
Date: Thu, 18 Oct 2018 22:21:10 +0200
Date: 2018-10-18T22:21:10+02:00 [thread overview]
Message-ID: <pqapvn$2u0$1@dont-email.me> (raw)
In-Reply-To: <alpine.DEB.2.21.1810181727240.13871@hexenstieg>
On 18.10.18 17:33, Stefan.Lucks@uni-weimar.de wrote:
> On Thu, 18 Oct 2018, G.B. wrote:
>
>> There is a type declaration, I rememberd, in Ada, that
>> does not allow any object of the type to be declared.
>
> What, exactly, is the point of your question?
Philip Wadler asked, on occasion[*], whether there was any programming
language other than Haskell that had a (concrete, usable in the normal
way I guess) type like ("unihabited") Void in Data.Void. (The point is
getting my feet wet at the shores of correspondences of logic, typed lambdas,
and categories with resp. programming languages' features.)
As a minimum, I imagine this means passing access-to-function values,
each such value designating a function whose signature include type Void.
Abstract functions cannot be designated, IINM, i.e., no 'Access.
> [... abstract ...]
> Note that objects of type Void'class can exist, but never, ever, any objects of type Void. Thus, for good reason the Ada compiler refuses to compile
>
> function Impossible(X: T) return Void;
So, I do want the above function to exist.
I'll put the following one on the shelf, then:
function Impossible (X : T) return Void is abstract;
Although, the idea is, presumably, that I can use an access-to-function
in some ways, but not actually call (apply) it or one of its overriding
substitutes. All of this, I think, an Ada compiler will prevent when
type Void is part of the signature.
__
[*] Propositions as Types, Talk at Lambda Days 2016 (according
to youtube)
next prev parent reply other threads:[~2018-10-18 20:21 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 12:14 A function that cannot be called? G.B.
2018-10-18 15:33 ` Stefan.Lucks
2018-10-18 20:21 ` G.B. [this message]
2018-10-18 20:57 ` Niklas Holsti
2018-10-19 7:15 ` Dmitry A. Kazakov
2018-10-19 13:55 ` G.B.
2018-10-19 15:31 ` Dmitry A. Kazakov
2018-10-18 17:03 ` AdaMagica
2018-10-18 19:36 ` G.B.
2018-10-18 21:30 ` Randy Brukardt
2018-10-19 14:00 ` G.B.
2018-10-19 15:39 ` Dmitry A. Kazakov
2018-10-20 1:34 ` Randy Brukardt
2018-10-20 9:14 ` G.B.
2018-10-20 11:13 ` Simon Wright
2018-10-20 14:11 ` Dmitry A. Kazakov
2018-10-21 9:25 ` G.B.
2018-10-21 9:07 ` G.B.
2018-10-21 9:51 ` Dmitry A. Kazakov
2018-10-21 10:57 ` Niklas Holsti
2018-10-21 18:00 ` Simon Wright
2018-10-19 8:48 ` AdaMagica
2018-10-19 11:15 ` G.B.
2018-10-19 17:06 ` AdaMagica
2018-10-19 19:57 ` G.B.
2018-10-19 22:06 ` Jere
2018-10-21 10:14 ` G.B.
2018-10-21 11:30 ` Egil H H
2018-10-23 11:45 ` G.B.
2018-10-23 14:35 ` Jere
2018-10-23 14:57 ` Dmitry A. Kazakov
2018-10-23 17:49 ` G.B.
2018-10-23 19:25 ` Dmitry A. Kazakov
2018-10-24 7:35 ` G.B.
2018-10-24 8:14 ` Dmitry A. Kazakov
2018-10-19 18:19 ` marciant
2018-10-19 18:22 ` marciant
2018-10-20 1:36 ` Randy Brukardt
2018-10-20 2:54 ` marciant
2018-10-19 20:25 ` Shark8
2018-10-19 23:28 ` marciant
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox