[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: type annotations

From: Claude Marinier
Subject: Re: type annotations
Date: Mon, 17 Aug 2020 13:54:46 -0400

On Mon, 17 Aug 2020 at 11:04, siiky <> wrote:
> On 8/16/20 1:54 PM, Claude Marinier wrote:
> > I have discovered types.
> > <>
> > When used judiciously and sparingly, this could be useful to prevent
> > errors and provide optimisation (specialisation) hints to the compiler.
> >
> > Is there a guide to using this well? I would like examples. Perhaps one
> > of the Chicken libraries or eggs can be used as an example.
> I myself would like some good usage examples of `chicken.type`, but if
> you're just getting started and not sure how to use them, or you're
> getting errors, I hope [0, 1, 2] may be helpful to you. The annotations
> on the macros in [1, 2] are not as strict as they could be. And some of
> the other type annotations may even be wrong (e.g. using the symbol uri
> to mean an URI object; the way I use it, it's the same as using *, the
> "any" type), because usually the compiler doesn't complain too much and
> I forget to update them.
> [0]:
> [1]:
> [2]:

Thank you, André,

The examples help. I expect that procedure signatures are the most
common use of type annotations. They seem to provide the most benefit
for the level of effort and extra code.

In the manual page for types ( ),
what is the meaning of the period in the definition of VALUETYPE for
procedures? The first three annotation variants for procedures use the
period: alone, with « -> », and with « --> ». I find the documentation


Claude Marinier

reply via email to

[Prev in Thread] Current Thread [Next in Thread]