我希望这是一个编程问题,因为在任何编程教程中,您最终都会在代码示例中遇到'foo'。(是吗?)

foo到底是什么意思?

如果它本来毫无意义,那么它是什么时候开始被这样使用的呢?


当前回答

我觉得这意味着什么都没有。维基上说:

Foo通常与元异步变量bar和foobar一起使用。

其他回答

它是一个元异步变量。

In my opinion every programmer has his or her own "words" that is used every time you need an arbitrary word when programming. For some people it's the first words from a childs song, for other it's names and for other its something completely different. Now for the programmer community there are these "words" as well, and these words are 'foo' and 'bar'. The use of this is that if you have to communicate publicly about programming you don't have to say that you would use arbitratry words, you would simply write 'foo' or 'bar' and every programmer knows that this is just arbitrary words.

法语“fou”(比如:amour fou) [crazy]用英语写,应该是“foo”,对吧?否则furchtbar -> foobar -> foo, bar -> barfoo -> barfuß(赤脚)。傻人。没有牙齿的脚。

我同意所有提到它的人,它的意思是:没什么有趣的,只是一些东西,通常需要完成一个语句/表达式。

我觉得这意味着什么都没有。维基上说:

Foo通常与元异步变量bar和foobar一起使用。

在我的同事中,术语“foo”的含义(或者更准确地说是使用)是作为一个占位符来代表一个名称的示例。例子包括,但不限于,yourVariableName, youobjectname,或yourColumnName。

今天,由于几个原因,我避免使用“foo”,而更喜欢使用这种类型的命名替换。

在我早年的时候,我最初发现在任何例子中使用“foo”作为一个位置来表示f' up的东西是令人困惑的。我想要一个实际的例子,而不是一些无聊的东西。 你的结果可能会有所不同,但我总是,100%,每次,从来没有失败,得到更多关于使用“foo”的实际变量的含义的后续问题。