I was wondering if it had ever been considered to allow discard as a block (similar to let, var, etc.)? It’s not a huge deal, but sometimes (especially when using a C library), I’d find it cleaner to write this:
discard a() b() c()
instead of:
discard a() discard b() discard c()
You can easily define such a block yourself, of course:
discard_all: a() b() c()
... but I wonder if there has ever been any thought given to offering this functionality by default, or if I’m the first person to "miss" it.
I am not familiar with Nim's internals; presumably, "discard" is a completely different language construct from "let", "var", etc., and therefore cannot be implemented/provided cleanly?
Thanks in advance.