understanding_nil__1_英文文献资料

understanding_nil__1_英文文献资料

ID:41695755

大小:2.10 MB

页数:138页

时间:2019-08-30

understanding_nil__1_英文文献资料_第1页
understanding_nil__1_英文文献资料_第2页
understanding_nil__1_英文文献资料_第3页
understanding_nil__1_英文文献资料_第4页
understanding_nil__1_英文文献资料_第5页
资源描述:

《understanding_nil__1_英文文献资料》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、understandingnil@francescthankswelcomeeverysingleoneofyouagendawhatisnil?whatisnilinGo?whatdoesnilmean?isniluseful?nil?youmisspellednullhowIlearnwordshowIlearnwordsetymologynilLatinnihilmeaningnothingnullLatinne+ullusmeaningnotanynoneOldEnglishne+ānmeaningnotonenamesforthenumberzer

2、oinEnglish-zero-cipher-null-love-duck-nil-nada-zilch-zip-theletter‘o’-naught-nought-aught-oughtsource:wikipedianilis(a)zerointerludeabitofhistory“Icallitmybillion-dollarmistake.Itwastheinventionofthenullreferencein1965.Atthattime,Iwasdesigningthefirstcomprehensivetypesystemforrefer

3、encesinanobjectorientedlanguage.”-SirC.A.R.Hoarepanic:runtimeerror:invalidmemoryaddressornilpointerdereferenceUncaughtTypeError:undefinedisnotafunctionnilleadstopanicpanicleadstofearbydanpawleyonFlickrfearleadstobykorymatthewonFlickrλfunctionalprogramming“FunctionalGo?Thanks,butno”

4、-francescatdotGo.eu2015therearemanyways,nilistheGowayzerovalueswhatarethey?zerovaluesbool→falsepointers→nilnumbers→0slices→nilstring→""maps→nilchannels→nilfunctions→nilinterfaces→nilzerovaluesforstructtypestypePersonstruct{AgeYearsintNamestringFriend[]Person}varpPerson/

5、/Person{0,"",nil}thetypeofnil“...unlessthevalueisthepredeclaredidentifiernil,whichhasnotype”-Golanguagespecificationuntypedzeroa:=falsea:=""a:=0//a:=int(0)a:=0.0//a:=float64(0)a:=nil//useofuntypednil“nilisapredeclaredidentifierrepresentingthezerovalueforapointer,channel,func,interf

6、ace,map,orslicetype.”-Godocumentationfor“builtin”package“nilisapredeclaredidentifierrepresentingthezerovalueforapointer,channel,func,interface,map,orslicetype.”-Godocumentationfor“builtin”packagetwenty-five*keywordsbreakdefaultfuncinterfaceselectcasedefergomapstructchanelsegotopack

7、ageswitchconstfallthroughifrangetypecontinueforimportreturnvar*plusthefivesecretones,obviouslypredefinedvskeyword//YOLOvarnil=errors.New(“¯_(ツ)_/¯”)*Forextraevilness:placeattheendofdoc.gozerovalueswhatdotheymean?kindsofnilpointersslicesmapschannelsfunctionsinterfaceskindsofnilpoin

8、tersslicesmapschannelsfunc

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。