# Equality of namespaces

**URL:** <https://racket.discourse.group/t/equality-of-namespaces/2279>\
**Category:** Questions & Answers\
**Tags:** namespace\
**Created:** [September 2, 2023, 7:13pm UTC](https://racket.discourse.group/t/equality-of-namespaces/2279 "2023-09-02T19:13:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [September 2, 2023, 7:13pm UTC](https://racket.discourse.group/t/equality-of-namespaces/2279/1 "2023-09-02T19:13:39Z")

</div>

```scheme
#lang racket/base

(eq? (make-base-namespace) (make-base-namespace)) ; --> #f ; ok, understandable.

; Nevertheless:

(let ((ns1 (make-base-namespace)) (ns2 (make-base-namespace)))
  (for/and ((x (in-list (namespace-mapped-symbols (make-base-namespace)))))
    (eq?
      (namespace-variable-value x #t (λ () 'not-retrievable) ns1)
      (namespace-variable-value x #t (λ () 'not-retrievable) ns2)))) ; --> #t ; very nice.

; This is like:

(define object 'aap)
(eq? (λ () object) (λ () object)) ; --> #f
(eq? ((λ () object)) ((λ () object))) ; --> #t

; From the documentation of namespaces I understand that the ‘nevertheless’ is guaranteed.
; Is this a correct understanding?

; I use base-namespaces in my toy interpreters for easy inclusion of Racket procedures,
; retrieved by means of namespace-variable-value.
; The fact that not all procedures can be retrieved this way is not important for me.
; (E.G. procedures with keyword arguments cannot be retrieved this way
; and, of course, macros cannot be retrieved this way either)
; Up to now my toys did not need to rely on the ‘nevertheless’,
; but in future I may want to.

; Is my understanding correct?

; PS. Toy interpreters are a hobby of mine.
; Some can be found on https://github.com/joskoot.

```
