remacs icon indicating copy to clipboard operation
remacs copied to clipboard

Impl Not for LispObject; cut is_nil and is_not_nil

Open nickdrozd opened this issue 5 years ago • 7 comments

nickdrozd avatar Dec 12 '19 01:12 nickdrozd

I need to scan this line by line, but overall solid. Thanks for taking the effort.

shaleh avatar Dec 12 '19 18:12 shaleh

@harryfei @brotzeit @agraven This change should address your complaint.

nickdrozd avatar Dec 22 '19 04:12 nickdrozd

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.

agraven avatar Dec 22 '19 11:12 agraven

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.

shaleh avatar Jan 10 '20 08:01 shaleh

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?

nickdrozd avatar Jan 15 '20 03:01 nickdrozd

I hear ya @nickdrozd. 1000% agreed.

shaleh avatar Jan 15 '20 16:01 shaleh

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.

db48x avatar Jan 16 '20 08:01 db48x