为什么Clojure的父亲说计划的真/假是破的? [英] Why did father of Clojure say that Scheme's true/false are broken?

查看:129
本文介绍了为什么Clojure的父亲说计划的真/假是破的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Rich Hickey在本 Rich张贴:


Scheme #t几乎完全是
无意义,因为Scheme条件为
test for#f / non-#f,not#f /# t。我不是
认为值#f有很多实用程序
无论什么,并且基于条件的
意味着写很多(if(not
(null?x)) ... where(如果x ...将在Clojure / CL中执行
,并且当
处理序列,过滤器等时,在表达力方面有大量的
减少。


邮件中的链接也是值得的,虽然第二个可能有点诗意。


In this video, Rich Hickey introduced Clojure for Lisp programmers.

At time 01:10:42, he talked about nil/false/end-of-sequence/'() among Clojure/Common Lisp/Scheme/Java. He said: "Scheme has true and false, but they are broken."

I don't understand why he said that and why does he consider it's "broken"?

解决方案

It strikes me you'd rather see it from the horse's mouth, so here's a choice extract from a message Rich posted:

Scheme #t is almost completely meaningless, as Scheme conditionals test for #f/non-#f, not #f/#t. I don't think the value #f has much utility whatsoever, and basing conditionals on it means writing a lot of (if (not (null? x))... where (if x... will do in Clojure/CL, and a substantial reduction in expressive power when dealing with sequences, filters etc.

The links in that message are also worthwhile, though the second one may be a bit poetic.

这篇关于为什么Clojure的父亲说计划的真/假是破的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆