# Should Julia have a recognized set of language specific metasyntactic variables?

**URL:** <https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474>\
**Category:** Community\
**Tags:** style\
**Created:** [November 20, 2023, 5:02pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474 "2023-11-20T17:02:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmanthony3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmanthony3/32/52953_2.png) [@jmanthony3](https://discourse.julialang.org/u/jmanthony3)\
**Post date:** [November 20, 2023, 5:02pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/1 "2023-11-20T17:02:11Z")

</div>

Would it be appropriate for the Julia community to have a list of commonly used metasyntactic variables like other languages? For example, [Python](https://en.wikipedia.org/wiki/Metasyntactic_variable#Python) has `spam`, `ham` and `eggs`.

I imagine that such a list could increase the legibility of sharing codes across large teams, communities, or for instruction to newcomers. Plus, the process of comprising a list could improve community morale and further distinguish Julia from other languages.

---

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [November 20, 2023, 5:06pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/2 "2023-11-20T17:06:36Z")

</div>

I think the `foo` `bar` `baz` family is a de-facto standard for Julia, at least from the discussions I’ve read

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 20, 2023, 5:22pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/3 "2023-11-20T17:22:36Z")

</div>

Spam? Spam spam spam and chips?  
I think we need to choose our own comedy TV series.

---

<div class="post-metadata">

**Author:** ![jmanthony3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmanthony3/32/52953_2.png) [@jmanthony3](https://discourse.julialang.org/u/jmanthony3)\
**Post date:** [November 20, 2023, 6:44pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/4 "2023-11-20T18:44:12Z")

</div>

How about Futurama? I don’t know the show very well, but I remember hearing about the [episode](https://en.wikipedia.org/wiki/The_Prisoner_of_Benda) wherein the writer of the show allegedly proved a theorem of mathematics.

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [November 20, 2023, 6:45pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/5 "2023-11-20T18:45:49Z")

</div>

> Metasyntactic variables used commonly across all programming languages include foobar, foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, and thud

> **[Metasyntactic variable](https://en.wikipedia.org/wiki/Metasyntactic_variable)**
>
> A metasyntactic variable is a specific word or set of words identified as a placeholder in computer science and specifically computer programming. These words are commonly found in source code and are intended to be modified or substituted before real-world usage. For example, foo and bar are used in over 330 Internet Engineering Task Force Requests for Comments, the documents which define foundational internet technologies like HTTP (web), TCP/IP, and email protocols.
> By mathematical analogy, a...

---

<div class="post-metadata">

**Author:** ![jmanthony3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmanthony3/32/52953_2.png) [@jmanthony3](https://discourse.julialang.org/u/jmanthony3)\
**Post date:** [November 20, 2023, 6:48pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/6 "2023-11-20T18:48:11Z")

</div>

Yes, I cited the same Wikipedia page but referred to the “Usage Examples” section for Python having its own, language specific variables.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [November 20, 2023, 8:44pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/7 "2023-11-20T20:44:56Z")

</div>

For what it’s worth, I see foo bar baz more often in Python code snippets than spam ham eggs, not much of the user base is familiar with Monty Python skits.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [November 20, 2023, 8:52pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/8 "2023-11-20T20:52:17Z")

</div>

We already kinda do, don’t we? Mostly borrowed from maths: `f` and `g` are functions, `A` is an array, `T` is a type, `x` is a scalar, `s` is often a string. Are there others?

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [November 20, 2023, 9:10pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/9 "2023-11-20T21:10:50Z")

</div>

`i,j,k` are indices. `d` is a Dict, Dictionary, or data. `df` is a `DataFrame`.

---

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [November 20, 2023, 11:15pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/10 "2023-11-20T23:15:24Z")

</div>

@miguelraz – didn’t you make something like this? 🤔

---

<div class="post-metadata">

**Author:** ![miguelraz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miguelraz/32/631_2.png) [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Post date:** [November 21, 2023, 2:45pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/11 "2023-11-21T14:45:24Z")

</div>

Yes, for technical terms around Julia code, but it would be nice to also add some coding conventions!

> **[GitHub - JuliaCommunity/StartHere.jl: A place for Julia beginners to start](https://github.com/JuliaCommunity/StartHere.jl)**
>
> A place for Julia beginners to start. Contribute to JuliaCommunity/StartHere.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![jmanthony3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmanthony3/32/52953_2.png) [@jmanthony3](https://discourse.julialang.org/u/jmanthony3)\
**Post date:** [November 27, 2023, 4:21pm UTC](https://discourse.julialang.org/t/should-julia-have-a-recognized-set-of-language-specific-metasyntactic-variables/106474/12 "2023-11-27T16:21:10Z")

</div>

I suppose this is true and something I didn’t really consider. Now that you mention the borrowing from math, I do remember reading early in my switch from Python to Julia that imaginary numbers are connoted as `im` because `i` and `j` are such common indexing variables.
