Prefixing things with My is so Windows 95...
In place of foo and bar I prefer to go with stuff like one() two() three(), or a() b() c(), timeless classics that need no explanation.
The point is that tyoe is an EXTREMELY vaulable information and if you are explaining code to someone it is very helpful to clearly see what are keywords, what are arbitrary variable names, and what are the types of the variables. For example if you show me a programming language where there is a list object and you write list.one(), I don't know if list is a variable or a keyword, and I don't know if one is a variable or a keyword. Much better to write mylist.one() if one is a default function, or mylist.myfirstelement() otherwise etc.
I mean everyone knows using descriptive variable names is good practice, but then in a coding tutorial it is somehow fine to use foo, bar, a, b, c? That makes things clearer for someone who understands all the types and the syntax, and wants to see the structure algorithm more clearly. It hurts someone trying to learn the language.
Your argument does make sense for teaching an intro to programming type class, where it may not be obvious what is a function name versus variable name. That just hasn't been my audience for a very long time now when explaining anything. I'd likely also go with var1 var2, fn1 fn2 type names if needing non-descriptive placeholders in that case. I mainly avoid foo and bar because to me it's a tired meme, and people tend to understand "variable names and function names can be anything" well before they ask "why does everyone insist on using foo, bar and baz all the time?" which is just extraneous lore. In my case, I was writing QBasic games many years before I encountered my first foo or bar.
>Your argument does make sense for teaching an intro to programming type class, where it may not be obvious what is a function name versus variable name.
Yea but the truth is a huge of audience of people who are not super familiar with the syntax of a languague will read tutorials describing how to build stuff in that language hoping they can piece things together. So for them it would be helpful.
Also, isn't all of programming just playing with types in a way? I feel like Intro to types never stops lol.
Oh, sorry that wasn't clear. I meant that type of class, as in, a class similar to "intro to programming", not a class about types in the programming sense.
And by "class", I mean classes in the school sense, haha. You're right though.