On Wed, Apr 22, 2020 at 12:06 AM Eric V. Smith email@example.com wrote:
That's a good example, Chris. Thanks. I also don't see that a namespace object would buy you much, if anything.
Going with the tersest proposal (twitter=twitter becomes twitter=), we'd save something like 40 characters in the function call in the return statement. I think making a change isn't worth adding more to the language, but of course reasonable people can disagree.
Thanks. But it's really not about terseness. I've already typed more in this thread than I'll probably save over a lifetime of shorthanding. If I wanted shorthands, I'd just use shorter variable names.
Removing duplication removes the possibility of desynchronization. It's far easier to see that "twitter=," is passing twitter with the same name than to check that all the instances of "twitter=twitter" and "channel=channel" and "tweets=tweets" are all perfectly correct. It also becomes a logical idiom for "pass these things to the template, as-is", rather than getting bogged down in the mechanics.