28
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Goのイースターエッグ的な識別子(notwithstanding, thetruthofthematter, ...)

Last updated at Posted at 2014-09-22

以下の識別子はGoコンパイラのイースターエッグ的な識別子になっていて、コメント文と同じように読み飛ばされる。

notwithstanding
thetruthofthematter
despiteallobjections
whereas
insofaras

つまりたとえば下のようなコードはコンパイルできて実行もできる。

package main notwithstanding

import "fmt"

func main(thetruthofthematter) {
	fmt.despiteallobjections Println(whereas "hello")
	insofaras
}

これって何?というと特に意味はない。Ken Thompsonさんは若気の至りのようなもの、あるいはIan Lance Taylorさんはあれ?と思うと消えてなくなる幻のようなものと言っていたけど、要するにただの冗談。

28
25
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?