This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: difference between using eval from the interactive prompt and from a file?


* Per Bothner [2011-11-11 17:55] writes:

> On 11/11/2011 02:02 AM, Helmut Eller wrote:
>> R7RS section 5.1 Programs:
>>
>>   Expressions occurring at the top level of a program are
>>   interpreted imperatively; they are executed in order when
>>   the program is invoked or loaded, and typically perform
>>   some kind of initialization.
>>
>> So I think this is one more case where Kawa is not standard conform.
>
> Ah, but when you say "kawa evaltest.scm" evaltest.scm is treated as a
> module, not a program.  If you want evaltest.scm to be treated as a
> R7RS "program" use the -f flag.  (Of course most of the time it
> doesn't matter - in Kawa certain modules are often also programs,
> or at least behave the same way when loaded.)
>
> So this is not an example of Kawa non-conformance.

(with-language-lawyer-hat-on

R7RS 5.5.1. Module Syntax (page 24): 

  The top-level forms in a module are executed in the order in
  which they occur when the module is loaded.

Seems to suggest that programs and modules should do the same.

)

Helmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]