缘起
在jsx教程看到这样一句话
Here is hello.jsx, the source code of the "Hello world!" example. You can see several features of JSX in this program, namely, static types and class structure within the source code.
class _Main {
static function main(args : string[]) : void {
log "Hello, world!";
}
}
Class _Main has a static member function (a.k.a. a class method) named main, that takes an array of strings and returns nothing.
那么method和function在计算机领域到底有什么不同呢?
参考资料
https://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function