외국 사이트들에 가보면 보통 임의의 함수나 변수 명으로 foo 혹은 bar를 사용한다.
예시)
// thread example
#include <iostream> // std::cout
#include <thread> // std::thread
void foo()
{
// do stuff...
}
void bar(int x)
{
// do stuff...
}
int main()
{
std::thread first (foo); // spawn new thread that calls foo()
std::thread second (bar,0); // spawn new thread that calls bar(0)
std::cout << "main, foo and bar now execute concurrently...\n";
// synchronize threads:
first.join(); // pauses until first finishes
second.join(); // pauses until second finishes
std::cout << "foo and bar completed.\n";
return 0;
}
foo와 bar의 기원은 이차 세계대전중 미군의 속어인 FUBAR fuxxed up beyond all recognition (형체도 알아볼 수 없을 정도로 x 되다.)에 있다고 한다.
추상적이고, 별 의미없이 정의할 때 사용되는듯 하다