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

Would it be appropriate for the Julia community to have a list of commonly used metasyntactic variables like other languages? For example, 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.

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

1 Like

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

1 Like

How about Futurama? I don’t know the show very well, but I remember hearing about the episode wherein the writer of the show allegedly proved a theorem of mathematics.

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

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

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.

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?

3 Likes

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

2 Likes

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

1 Like

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

2 Likes

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.