# Comments inside macros

**URL:** <https://forum.crystal-lang.org/t/comments-inside-macros/2333>\
**Category:** Help & Support\
**Created:** [July 14, 2020, 6:51am UTC](https://forum.crystal-lang.org/t/comments-inside-macros/2333 "2020-07-14T06:51:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![u89012](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/u89012/32/1021_2.png) [@u89012](https://forum.crystal-lang.org/u/u89012)\
**Post date:** [July 14, 2020, 6:51am UTC](https://forum.crystal-lang.org/t/comments-inside-macros/2333/1 "2020-07-14T06:51:41Z")

</div>

I think it’ll be nice if comments were permitted (no evaluation at all) inside macros, perhaps using a double sharp? Having to move the code around when experimenting is tiring.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [July 14, 2020, 12:37pm UTC](https://forum.crystal-lang.org/t/comments-inside-macros/2333/2 "2020-07-14T12:37:26Z")

</div>

> <https://github.com/crystal-lang/crystal/issues/4380>
>
> https://carc.in/#/r/1zai
> {% for verb in {:get, :post, :put} %}
> macro {{verb.id}}(arg)
> puts "not commented" \\{{arg}}
> # puts "commented" \\{{arg}} # =\> undefined...

Seems to be kinda related. It would need to be something like @bew suggested in order to still allow creating comments with macro variables.

---

<div class="post-metadata">

**Author:** ![u89012](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/u89012/32/1021_2.png) [@u89012](https://forum.crystal-lang.org/u/u89012)\
**Post date:** [July 14, 2020, 2:36pm UTC](https://forum.crystal-lang.org/t/comments-inside-macros/2333/3 "2020-07-14T14:36:35Z")

</div>

Thanks for the link @Blacksmoke16. Yup, same thing. But I think a {# #} while consistent with the rest of the syntax is a lot more to type (to toggle I mean) than just invoking a `cmd+/` to toggle out a line, but then again is consistent with ERB I suppose. Just my two cents.

---

<div class="post-metadata">

**Author:** ![kim](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kim/32/693_2.png) [@kim](https://forum.crystal-lang.org/u/kim)\
**Post date:** [July 16, 2020, 1:17am UTC](https://forum.crystal-lang.org/t/comments-inside-macros/2333/4 "2020-07-16T01:17:17Z")

</div>

Some previous discussion on this here: [https://github.com/crystal-lang/crystal/issues/8408](https://github.com/crystal-lang/crystal/issues/8408)
