~technomancy/fennel

Ignoring _ in let

Details
Message ID
<87ef14wjfx.fsf@hector.i-did-not-set--mail-host-address--so-tickle-me>
DKIM signature
missing
Download raw message
_ is already ignored in match, perhaps it'd be useful to ignore it (as
in not actually bind the expression to anything) in let as well. I
mentioned this previously in
https://github.com/bakpakin/Fennel/issues/174, but thought the mailing
list would be a more suitable place to discuss the pros and cons.

The use case for this would be a simple way of doing side effects
mid-let. That probably doesn't sound like a great pitch at first, but
it really comes in handy when debugging. I already use _ for this
purpose, but the fact that it binds a local makes this usage less than
ideal and has already bit me a few times.

We could probably leave local alone, as you can run side effects next to
it easily as-is. This would allow users to bind _ if they really wanted
to.

Thoughts?

- Benaiah Mischenko