# Renaming mechanism for Unicode \`λ\` in Racket

**URL:** <https://racket.discourse.group/t/renaming-mechanism-for-unicode-in-racket/2910>\
**Category:** General\
**Created:** [May 8, 2024, 5:12pm UTC](https://racket.discourse.group/t/renaming-mechanism-for-unicode-in-racket/2910 "2024-05-08T17:12:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoahStoryM](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/noahstorym/32/17_2.png) [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Post date:** [May 8, 2024, 5:12pm UTC](https://racket.discourse.group/t/renaming-mechanism-for-unicode-in-racket/2910/1 "2024-05-08T17:12:57Z")

</div>

I'm considering whether it's necessary and beneficial to define `λ` through the renaming mechanism. @sorawee pointed out that `lambda` and `λ` are not treated as equivalent by `free-identifier=?`:

```scheme
#lang racket

(module sub racket
  (provide my-case-lambda
           (rename-out [my-case-lambda my-case-λ]))
  (define my-case-lambda 1))

(require syntax/parse/define
         'sub)

(define-syntax-parse-rule (test a b)
  #:do [(println (free-identifier=? #'a #'b))]
  (void))

(test my-case-lambda my-case-λ) ;=> #t
(test lambda λ) ;=> #f

```

If I understand correctly, `lambda` and `λ` in `racket/base` are respectively `new-lambda` and `new-λ` in `racket/private/kw.rkt`:

```scheme
(define-syntaxes (new-lambda new-λ)
  (let ([new-lambda ...])
    (values new-lambda new-lambda)))

```

Based on this, should we consider:

- Implementing `λ` through renaming to ensure that it is equivalent to `lambda`?
- Investigating the potential impact on existing code that might rely on the current behavior?

[Define `λ` through the renaming mechanism.](https://github.com/racket/racket/pull/4991)

---

<div class="post-metadata">

**Author:** ![NoahStoryM](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/noahstorym/32/17_2.png) [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Post date:** [May 15, 2024, 1:38am UTC](https://racket.discourse.group/t/renaming-mechanism-for-unicode-in-racket/2910/2 "2024-05-15T01:38:13Z")

</div>

In typed racket, `(free-identifier=? #'lambda #'λ)` returns `#t`.

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [May 20, 2024, 5:53pm UTC](https://racket.discourse.group/t/renaming-mechanism-for-unicode-in-racket/2910/3 "2024-05-20T17:53:00Z")

</div>

This sort of change and the ones in [Add `case-λ`. by NoahStoryM · Pull Request #4990 · racket/racket · GitHub](https://github.com/racket/racket/pull/4990) and [Add `match-λ[*][*]`. by NoahStoryM · Pull Request #4989 · racket/racket · GitHub](https://github.com/racket/racket/pull/4989) are certainly the kind that can create compatibility problems. But in trying them out and searching for potential collisions in registered packages, I have not detected any issues, so far.

So, I'm ok with making the changes — with the understanding that we may have to revert some if a problem is uncovered later (perhaps in the package-build phase of testing for the v8.14 release).
