Go中函数参数中的后增量运算符,不可能吗?

How come, in Go (1.2.1), this works?

package main

import (
    "fmt"
)

func main() {
    var i = 0
    for i < 10 {
        fmt.Println(i)
        i++
    }
}

But this (with the increment operator in the function argument) doesn't?

package main

import (
    "fmt"
)

func main() {
    var i = 0
    for i < 10 {
        fmt.Println(i++)
    }
}

In Go, i++ is a statement, not an expression. So you can't use its value in another expression such as a function call.

This eliminates the distinction between post-increment and pre-increment, which is a source of confusion and bugs.