关于英文单词 foo 到底是什么意思

2020 年 11 月 7 日
 VHacker1989

我在很多示例代码都喜欢用这个单词,查了下有道说是函数的意思,感觉在很多示例代码中又不像这个意思

4307 次点击
所在节点    English
24 条回复
lcdtyph
2020 年 11 月 7 日
placeholder,简单来说当你不知道取个什么名字,而且名字不重要的时候就可以用 foo,bar,foobar 来占位

就类似指代人名时候的张三、李四
rogwan
2020 年 11 月 7 日
foo 是 fu 的变体缩写,有 function 的意思,也有 fuck-up 的意思。
JJstyle
2020 年 11 月 7 日
https://en.wikipedia.org/wiki/Foobar#History_and_etymology

...he used the word due to having seen it on the bottom of a jade Chinese figurine in San Francisco Chinatown, purportedly signifying "good luck".[3] If true this is related to the Chinese word fu ("福", sometimes transliterated foo), which can mean happiness or blessing.
loading
2020 年 11 月 7 日
@JJstyle 我差点信了。
BrettD
2020 年 11 月 7 日
“小明”的意思
Qlccks2
2020 年 11 月 7 日
foo bar
张三 李四
小明 小红
qiayue
2020 年 11 月 7 日
假设你是 foo,你的朋友 bar 正在参加每果大选,在结果即将出来之前,请你用英文写一封信给 bar……
anguiao
2020 年 11 月 7 日
比 test 看起来逼格高一点,仅此而已
delectate
2020 年 11 月 7 日
路人甲的意思。
ethanlu
2020 年 11 月 7 日
foobar

(They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept.)
ybbswc
2020 年 11 月 7 日
路人甲,路人乙。
李雷,韩梅梅。
Mutoo
2020 年 11 月 7 日
chihiro2014
2020 年 11 月 7 日
甲乙丙丁
gainsurier
2020 年 11 月 7 日
foobar,福报。
1more
2020 年 11 月 7 日
foo = example1
bar = example2
imn1
2020 年 11 月 7 日
foo 福
bar 报
zsdroid
2020 年 11 月 7 日
这个问题和我刚学 java 泛型时问 T 是什么意思一样
itechify
2020 年 11 月 7 日
var foo = bar
yungo8
2020 年 11 月 7 日
我第一次看到这个时,因为我只会简单英语,首先就读 fool,联想到傻瓜....
dcalsky
2020 年 11 月 8 日
三个的时候用:'foo' 'bar' 'baz'
单个的时候可以用: 'foobar'或者'foo'
为什么:总比 test, shit, fuck 的要好....

算法代码一般用 ijkmn, 而 foo bar 一般的用在 demo code 里

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/722750

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX