[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:02124] Re: defconstant



山本 さん、こんにちは。逸見 です。

≫実際には bar baz は別ファイルで defconstant しているので定数は定
≫数だよなぁ、と思ってます。それで、そもそもバイトコンパイルの時点
≫で定数の値が束縛?されるのは変なのではないかと感じたのです。

えっ、そもそも、defconstantって、コンパイラに楽させてあげるために
教えてあげる情報かと思っていたのですが。

C言語の#defineと一緒でコンパイル時に定数にしちゃっていいよって事。

違うのかなぁ?

英語は苦手なのでよくわからないんですが(笑)
Description: defines name as a global constant with value initial-value.
doc-string is attached to name as documentation of type variable.
Constants may not be bound or reassigned except by another call to defconstant.
defconstant asserts that the compiler can freely substitute the value of name
-------------------------------------------------------------------------
 for any references to it. 
-------------------------------------------------------------------------
Thus a subsequent redefinition of the constant may not affect the operation
 of compiled code. See also delete-variable.

(バイト)コンパイルしたときに、定数を確定させちゃっていいよって
意味じゃぁないのかなぁ。

バイトコンパイル後のファイル *.lcをロード時に値を確定するという意味では
ないと思うのですが。

≫そういうものなのでしょうか?

日ごろまともなCommonLispを触ってないのでよくわかりませんm(. .)m

------------------------------------------------------------
逸見雅人        Email   henmi@xxxxxxxxxxxxx
Right now my favorites of favorites:
 あなたの一番になりたい
 この世で一番大切なもの

Index Home