그러네요. 아직 제가 Go에 능통하지 않아서 확신은 안 서지만 좋은 syntactic sugar 같네요. 의미도 대략 분명해 보이고...
--
--
* 이 그룹에 이메일로 게시하려면 다음 주소로 이메일을 보내시면 됩니다.
golang...@googlegroups.com
* 추가 옵션을 보려면 http://groups.google.com/group/golang-korea?hl=ko?hl=ko의 그룹을 방문하세요.
GoStmt = "go" Expression .
The expression must be a call. The function value and parameters are evaluated as usual in the calling goroutine, but unlike with a regular call, program execution does not wait for the invoked function to complete. Instead, the function begins executing independently in a new goroutine. When the function terminates, its goroutine also terminates. If the function has any return values, they are discarded when the function completes.
네. 리턴 받을 때까지 기다리지 않는 거라서 지금 스펙에서는 리턴값이 무시되는데, 데이터를 받는 것과 관련된 채널을 리턴하는 걸로 약간의 신택틱 슈거 같은 게 있으면 어떨까 하는 의견이라 생각합니다.
근데 고 언어는 군더더기 최대한 안 붙이려는 언어라... 래핑 함수 하나 만들면 해결될 일이라면.. 안 넣을 것 같습니다.