Re: coop - a concurrent ml-like wanna be (pre-SRFI) Wolfgang Corcoran-Mathe 06 May 2021 19:12 UTC

On 2021-05-06 19:22 +0200, Marc Nieper-Wißkirchen wrote:
> Am Do., 6. Mai 2021 um 18:28 Uhr schrieb Amirouche <xxxxxx@hyper.dev>:
>
>        (lambda args
> >          ;; TODO: use chibi's match
> >
>
> NB: Use `case-lambda` when possible. It is optimized in a number of
> Schemes, while Chibi's match does not produce optimized code.

It's worth mentioning that, as `match' is broadly implemented and
(finally) part of a SRFI, it's probably a safe bet for portable code.
It's not just (chibi match) anymore.

Alternatively, or if you're worried about performance, you might
copy-and-paste Oleg Kiselyov's highly efficient pmatch macro, which
provides a decent subset of the WCS pattern-matching system:

https://github.com/webyrd/quines/blob/master/pmatch.scm

Primarily off-topic, I know!  I'm very interested to see where the
coop idea goes; I'd appreciate an alternative to SRFI 18 for
concurrent Scheme programs.

Regards,

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"I have regarded it as the highest goal of programming language design
to enable good ideas to be elegantly expressed." --C.A.R. Hoare