remacs
remacs copied to clipboard
Impl Not for LispObject; cut is_nil and is_not_nil
I need to scan this line by line, but overall solid. Thanks for taking the effort.
@harryfei @brotzeit @agraven This change should address your complaint.
I'd still prefer something akin to the macro shaleh proposed, while the automatic dereferencing is definitely an improvement, !!
is still not a very intuitive symbol, I personally have to stop and consciously think about what it means every time I see it.
What do you say Nick? Is bool!()
concise enough? Do we stick with is_nil()
? I am not sold on the double bang having seen how this reads. But this is a group effort so my vote is not the one that matters. I know that '!!' is somewhat common in Javascript circles. So maybe this for me is generational.
I don't know, it's hard to get enthusiastic about any of these options. I just wish we could automatically coerce things to booleans in a boolean context...is that so much to ask? Why is it that coercion is fine with negation, but not otherwise?
I hear ya @nickdrozd. 1000% agreed.
Yea, I feel like if
should have a trait the way for
does. Maybe we should write a proposal. Maybe there already is one? I haven't looked, but it seems like a fairly obvious one.