You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the rationale for making False truthy in lif? Because that's just bizarre. I know that nil in its various incarnations is the one true false in Common Lisp. But in every Lisp I know of that actually has a false, it is, in fact, falsey.
I do understand the need for both Pythonic if and Lispy lif. There are cases it simplifies, that could fail on e.g. 0 being falsey. I think Clojure is our best guide here. In Clojure, both nil and false (and nothing else) are falsey.
Now I am not proposing a third cif. I think that over-complicates things. If there truly are good reasons for making false truthy, then we should change all the ? predicates in Hy to return nil instead of false (as with Common Lisp's p predicates). Otherwise, can we make lif act more like Clojure, please?
The text was updated successfully, but these errors were encountered:
I needed a canonical lisp-ish sense of logical truth to implement a corner-case in a monadic parser-combinator I was writing to parse Hy… so that we could write READ in hy and eventually have Hy written in Hy. Python’s idea of truth is a little too broad in certain situations where 0 is a perfectly legitimate value and not a boolean.
What's the rationale for making False truthy in lif? Because that's just bizarre. I know that nil in its various incarnations is the one true false in Common Lisp. But in every Lisp I know of that actually has a false, it is, in fact, falsey.
I do understand the need for both Pythonic if and Lispy lif. There are cases it simplifies, that could fail on e.g. 0 being falsey. I think Clojure is our best guide here. In Clojure, both nil and false (and nothing else) are falsey.
Now I am not proposing a third cif, I think that over-complicates things. If there truly are good reasons for making false truthy, then we should change all the ? predicates in Hy to return nil instead of false (as with Common Lisp's p predicates). Otherwise, can we make lif act more like Clojure, please?
—
Reply to this email directly or view it on GitHub.
@gilch's argument seems even better now that nil is gone in place of None. That said, I never use lif myself, so I can't say I have very strong preferences here.
What's the rationale for making
False
truthy inlif
? Because that's just bizarre. I know thatnil
in its various incarnations is the one true false in Common Lisp. But in every Lisp I know of that actually has a false, it is, in fact, falsey.I do understand the need for both Pythonic
if
and Lispylif
. There are cases it simplifies, that could fail on e.g. 0 being falsey. I think Clojure is our best guide here. In Clojure, both nil and false (and nothing else) are falsey.Now I am not proposing a third
cif
. I think that over-complicates things. If there truly are good reasons for making false truthy, then we should change all the?
predicates in Hy to returnnil
instead of false (as with Common Lisp'sp
predicates). Otherwise, can we makelif
act more like Clojure, please?The text was updated successfully, but these errors were encountered: