【发布时间】:2011-02-06 12:42:55
【问题描述】:
我发现 defs 是循环的,主语是由它们的动词定义的,但动词是未定义的!那么如何定义它们呢?
循环定义
初始化:初始化一个变量。可以在 声明。
赋值:为变量赋值。它可以在任何地方完成,只能使用最终标识符一次。
声明:向变量声明值。
[更新,尝试用 lambda calc 理解主题]
D(x type) = (λx.x is declared with type)
A(y D(x type)) = (λy.y is assigned to D(x type))
%Then after some beta reductions we get initialization.
D(x type) me human // "me" declared with type "human"
A(y (D(x type) me human)) asking // "asking" assigned to the last declaration
%if the last two statemets are valid, an initialization exists. Right?
【问题讨论】:
-
Declaration、Initialization 和 Assignment 都包含在 Java 教程跟踪中:Learning the Java Language。
标签: java initialization declaration variable-assignment