---
title: "Discussion on \"Why is println! a macro in Rust?\" | Hashnode"
description: "Discussion on \"Why is println! a macro in Rust?\". Macro vs Function?\nA macro can be thought of as code that generates more code at compile time.\n\nSo, if you were to use macro's instead of functions in your code, you would end up getting a comparatively big executable in the end.\n\nAn easy, but mildly..."
url: "https://hashnode.com/posts/why-is-println-a-macro-in-rust/619e5fec63587e7e6c9df21d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why is println! a macro in Rust?](https://usethesource.hashnode.dev/why-is-println-a-macro-in-rust?utm_source=hashnode&utm_medium=feed)

Macro vs Function? A macro can be thought of as code that generates more code at compile time. So, if you were to use macro's instead of functions in your code, you would end up getting a comparatively big executable in the end. An easy, but mildly...

Nov 24, 2021 · 2 min read · usethesource.hashnode.dev  
Read the article

-   [#rust](https://hashnode.com/tag/rust)

## Written by

[Utkarsh Bindal](https://hashnode.com/@utkarshbindal)

@utkarshbindal

  
[View profile](https://hashnode.com/@utkarshbindal)

Senior Software Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Carlos Armando Marcano Vargas](https://hashnode.com/@Carlos27)

[Nov 24, 2021](https://hashnode.com/posts/why-is-println-a-macro-in-rust/619e5fec63587e7e6c9df21d/comment/619e6cb511146d7e145e9c71)

Really great. Happy to see Rust content.

[Utkarsh Bindal](https://hashnode.com/@utkarshbindal)

[Nov 25, 2021](https://hashnode.com/posts/why-is-println-a-macro-in-rust/619e5fec63587e7e6c9df21d/comment/619e6cb511146d7e145e9c71#reply-619f724b9829fb749bcbe66f)

Thanks for the encouragement. :)
