Renaming mechanism for Unicode `λ` in Racket

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=?:

#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:

(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.

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

This sort of change and the ones in Add `case-λ`. by NoahStoryM · Pull Request #4990 · racket/racket · GitHub and Add `match-λ[*][*]`. by NoahStoryM · Pull Request #4989 · racket/racket · GitHub 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).