# Racket meets CHICKEN

**URL:** <https://racket.discourse.group/t/racket-meets-chicken/1971>\
**Category:** Show & Tell\
**Created:** [May 31, 2023, 8:20am UTC](https://racket.discourse.group/t/racket-meets-chicken/1971 "2023-05-31T08:20:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominik.pantucek](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dominik.pantucek/32/144_2.png) [@dominik.pantucek](https://racket.discourse.group/u/dominik.pantucek)\
**Post date:** [May 31, 2023, 8:20am UTC](https://racket.discourse.group/t/racket-meets-chicken/1971/1 "2023-05-31T08:20:02Z")

</div>

For about three months now I have been working on a "little" project in CHICKEN Scheme[1]. I really missed the Racket-style keyword arguments there and therefore I hacked together a few syntax-rules and one CHICKEN-specific hack (determining whether given token is a keyword during expansion) and now I can use Racket-style keyword arguments almost like in Racket. The code is available at:

> **[Dominik Joe Pantůček / Chicken Racket kwargs · GitLab](https://gitlab.com/racketeer/chicken-racket-kwargs)**
>
> GitLab.com

If you want to use Racket-style keyword arguments in your CHICKEN projects, just grab the racket-kwargs.scm file and use define\* and lambda\* forms like you would use regular define and lambda forms. If you are compiling your code, the error messages should be both very informative and point you to the right source location. If you are using the interpreter, the source location is not available as of now.

While working on it, I discovered SRFI-89 and wondered what was the reasoning behind the syntax used by Racket? Why not the way SRFI-89 does it? Rumor is that Racket-style keyword arguments predate SRFI-89 - but it would be interesting to know the rationale behind the syntax we use.

Also any other comments regarding the (very inefficient) implementation are welcome.

[1] [http://call-cc.org/](http://call-cc.org/)

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [May 31, 2023, 8:42am UTC](https://racket.discourse.group/t/racket-meets-chicken/1971/2 "2023-05-31T08:42:48Z")

</div>

Hi Dominik,

The keyword paper is here:

**[Keyword and Optional Arguments in PLT Scheme](http://www.cs.utah.edu/plt/publications/scheme09-fb.pdf)**  
Flatt and Barzilay

I think there were a poll at the time?

These threads are newer:

[https://groups.google.com/g/racket-users/c/DwBFnlHHA40/m/4S-5\_stICgAJ](https://groups.google.com/g/racket-users/c/DwBFnlHHA40/m/4S-5_stICgAJ)  
[https://groups.google.com/g/racket-users/c/3vOTC1FbieA/m/-Pa6pNw1BAAJ](https://groups.google.com/g/racket-users/c/3vOTC1FbieA/m/-Pa6pNw1BAAJ)

For html I am using a trick picked up from `#lang scribble/html`.  
Here a new #%top is used, such that identifiers that end with colon evaluate to a symbol.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [May 31, 2023, 11:41am UTC](https://racket.discourse.group/t/racket-meets-chicken/1971/3 "2023-05-31T11:41:24Z")

</div>

That is interesting reading

There is even earlier stuff that references [SRFI-89](https://srfi.schemers.org/srfi-89/srfi-89.html):

[https://lists.racket-lang.org/users/archive/2007-June/018964.html](https://lists.racket-lang.org/users/archive/2007-June/018964.html)

The very nice reader extensions `#lang kw-colon colon-kw racket` by @AlexKnauth came up on the discord recently.

S.
