Greppability is an underrated code metric

https://piefed.social/post/380937

Greppability is an underrated code metric

I am not a big fan of the first example. If all that a function is doing is pasting its argument into a template string, then I’d rather see that expressed explicitly in a single line of code mentally infer myself after reading two separately handled cases in six lines of code.

It comes off as simulating enums with strings.

And yeah, even the string interpolation seems kind of excessive when it’s just appending _address. Js is even kinda infamous for how willing it is to do that with +.