Lua

ph
Admin (토론 | 기여)님의 2017년 7월 12일 (수) 14:29 판 (→‎colon vs. dot)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
이동: 둘러보기, 검색

lua 5.3 reference manual

tutorial

  • 워낙 문법도 간단해서 레퍼런스 매뉴얼을 대강 다 보는데도 1시간 안쪽이지만, 더욱 간단한 것을 원하면 torch tutorial을 보는 것도 나쁘지 않다.

colon vs. dot

A call v:name(args) is syntactic sugar for v.name(v,args), except that v is evaluated only once.

Lua manual : Function Calls
Tutorial: Understanding the colon vs. dot operator

자신(self)이 필요하면 직접 넘기는 식으로 모두 dot(.)으로 통일할 수 있으나 편의상 다들 :씀.