# Question about gensym

**URL:** <https://racket.discourse.group/t/question-about-gensym/2826>\
**Category:** Questions & Answers\
**Created:** [March 23, 2024, 10:36am UTC](https://racket.discourse.group/t/question-about-gensym/2826 "2024-03-23T10:36:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antigen-11](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/antigen-11/32/1813_2.png) [@Antigen-11](https://racket.discourse.group/u/Antigen-11)\
**Post date:** [March 23, 2024, 10:36am UTC](https://racket.discourse.group/t/question-about-gensym/2826/1 "2024-03-23T10:36:51Z")

</div>

Hello, everyone.

I want to generate unique names containing only alphanumeric characters and '\_' in racket. Is it safe to use `gensym`?

For example,

```scheme
(define (make-unique-name)
   (gensym 'my_name))

```

Can I be sure `(make-unique-name)` will always generate names I want?

---

<div class="post-metadata">

**Author:** ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)\
**Post date:** [March 23, 2024, 11:22am UTC](https://racket.discourse.group/t/question-about-gensym/2826/2 "2024-03-23T11:22:20Z")

</div>

`gensym` is not really for generating a unique name. It’s for generating a value that is not `eq?` with any other values. If you want a (practically) unique name, I would recommend [uuid](https://docs.racket-lang.org/uuid/).

---

<div class="post-metadata">

**Author:** ![Antigen-11](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/antigen-11/32/1813_2.png) [@Antigen-11](https://racket.discourse.group/u/Antigen-11)\
**Post date:** [March 23, 2024, 11:46am UTC](https://racket.discourse.group/t/question-about-gensym/2826/3 "2024-03-23T11:46:44Z")

</div>

Thanks for your reply! That really works!
