July 8th Wednesday (七月 八日 水曜日)

本文深入探讨了Scheme语言中参数的概念及其工作原理。参数在Scheme中既是线程特定的也是延续特定的,通过延续标记和线程单元定义。文章解释了如何通过参数过程访问和设置当前线程中的线程单元值,并在非空延续中通过延续标记确定参数值。

Parameters

  Parameters are essentially a derived concept in Scheme; they are defined in terms of continuation marks and thread cells. However,
parameters are also built in, in the sense that some primitive procedures consult parameter values. For example, the default output
stream for primitive output operations is determined by a parameter.

  A parameter is a setting that is both thread-specific and continuation-specific. In the empty continuation, each parameter corresponds
to a preserved thread cell; a corresponding parameter procedure accesses and sets the thread cell's value for the current thread.

  In a non-empty continuation, a parameter's value is determined through a parameterization that is associated with the nearest enclosing
continuation frame though a continuation mark (whose key is not directly accessible). A parameterization maps each parameter to a preserved
thread cell, and the combination of thread cell and current thread yields the parameter's value. A parameter procedure sets or accesses
the relevant thread cell for its parameter.

  Various operations, such as parameterize or call-with-parameterization, install a parameterization into the current continuation's frame.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值