foo bar 是什么?
URL:http://blog.iyi.cn/start/2005/11/foo_bar.html
技术文档中经常出现foo bar命名的变量,一直想知道这两个词到底什么意思。今天看freebsd的文档,又看到这俩,忍不住好奇,搜索了一下。
在http://catb.org/~esr/jargon/html/F/foo.html找到了关于这两个词的解释,大概是说foo来自于华纳卡通公司的一部动画片。里面有一段居然跟汉语撤上关系:)
According to the Warner Brothers Cartoon Companion Holman claimed to have found the word “foo” on the bottom of a Chinese figurine. This is plausible; Chinese statuettes often have apotropaic inscriptions, and this one was almost certainly the Mandarin Chinese word fu (sometimes transliterated foo), which can mean “happiness” or “prosperity” when spoken with the rising tone (the lion-dog guardians flanking the steps of many Chinese restaurants are properly called “fu dogs”). English speakers' reception of Holman's ‘foo’ nonsense word was undoubtedly influenced by Yiddish ‘feh’ and English ‘fooey’ and ‘fool’.
华纳卡通公司Holman断言在中国的小雕像底下找到“foo",这有点似是而非,中国的"福"字发音确实是fu或者foo。不过英语中的"foo"可以确信是受到依地语的“feh”和英语的“fooey"和”fool“的影响。
英语不太好,大概是这个意思吧?
bar的来源大概是源于DEC的手册,后来越来越多的根foo连用在各种手册中作为变量。http://catb.org/~esr/jargon/html/F/foobar.html
http://catb.org/~esr/jargon这里关于行业用语的资料很多^^
评论:
记得以前查过这个问题,因为好多例程都拿Foo来做函数名或者类名,foo应该是指“佛”
by: Anonymous | December 5, 2005 11:35 AM
呵,我是根据这句翻译的:
Chinese word fu, which can mean “happiness” or “prosperity”
幸福、繁荣,应该是“福”的意思吧
当然这里说的也不一定准确,只是知道个大概。
by: david | December 5, 2005 11:47 AM
我也找了半天没找到,:(
by: guoshuang | December 8, 2005 2:23 PM
真巧,居然搜索到你这里来了!!~~
by: aw | February 28, 2007 4:08 PM
真巧 我也搜索到你这里来了
by: exTerry | December 12, 2007 11:56 AM
真TM巧,我也搜来了
by: Anonymous | December 15, 2007 11:48 PM
真TM巧,我也搜来了
by: Anonymous | January 10, 2008 8:02 PM
真TM巧,我也搜来了
by: Anonymous | April 27, 2008 9:04 PM
真TM巧,我也搜来了
by: Anonymous | June 23, 2008 2:24 PM
真TM不巧,我也搜来了
by: Anonymous | June 25, 2008 10:14 AM
真TM不巧,我也搜来了.
by: Anonymous | July 1, 2008 2:40 PM