Am Do., 8. Sept. 2022 um 01:29 Uhr schrieb John Cowan <[email protected]>:

>
>
> On Wed, Sep 7, 2022 at 6:23 PM Per Bothner <[email protected]> wrote:
>
>
>> Most do. `list` doesn't but it may not count as "ad-hoc polymorphic":
>>
>
> Right: `list`, like `cons`, `vector`, etc. are universally polymorphic.  A
> vector of promises to deliver integers is not the same as a vector of
> integers.  But `string` can force, because a string element can't be a
> promise to deliver a character; it should always be an actual character.
>

Well, in that case, `string` could return a promise instead, turning it
into a non-strict procedure.

I want to say by this that it is a non-trivial matter to decide which
primitive procedures should be strict and which should be non-strict.  In a
truly non-strict programming language, there would be no place for
strictness, but even Haskell is not absolutely non-strict.

Reply via email to