DrRacket、R5RS和错误程序
我喜欢 DrRacket IDE,但目前我正在构建一个我希望独立于它的宠物项目,这意味着我致力于仅使用 R5RS 标准程序。
问题是,在 DrRacket 中有一个名为“错误”的过程,我想继续使用它,但我在标准中找不到它。
我想知道是否有一种方法可以仅使用标准过程来模拟“错误”过程,以便代码可以在不同的方案实现之间移植。
我尝试过“显示”,但它似乎并不完全是我想要的,因为输出时不会发出错误信号。
I love DrRacket IDE, but currently I'm building a pet project where I would like to be independent from it, meaning i'm commited to use only R5RS standard procedures.
The thing is, in DrRacket there's this procedure called "error" which i would like to continue using but I can't find it in the Standards.
What i would like to know is if there's a way to emulate that "error" procedure using only the Standards procedures so that the code is portable between different implementations of Scheme.
I've tried "display" but it doesn't seem to be quite what I want for that does not signal an error while outputting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我们的讲师给我们的实现:
This is the implementation that our lecturer gave us:
好吧,根据这个: http://srfi.schemers.org/srfi- 23/srfi-23.html,错误过程非常广泛可用,所以我认为您使用它是安全的。
Well, according to this: http://srfi.schemers.org/srfi-23/srfi-23.html, the error procedure is pretty widely available, so I think you would be safe using that.