3 ms·
> That’s a lot of code to write for an auto-incrementing counter. Is it though? I mean I happily write more code for a single-page Vue component for something
by unfocussed_mike 5y ago
> That’s a lot of code to write for an auto-incrementing counter.
Is it though?
I mean I happily write more code for a single-page Vue component for something like this.
Terseness is not always a virtue.
- orra 5y ago> Terseness is not always a virtue. This is a subjective thing, right? Personally, I hate boilerplate: either it's a distraction because it's boring and superfluous, or worse it's long and it's wrong. Regardless, it adds to the cognitive load when maintaining code.
- unfocussed_mike 5y agoYeah, definitely, hence the "not always" in this case. There are several terse syntaxes I really like. I'm just not convinced it's a virtue in this context.
- strangeattractr 5y agoThe vue code for this is pretty terse anyway to be honest. A single variable in data, a call to setInterval in the created hook and a few lines of html with template formatting. It's extremely clear what's going on too.
- unfocussed_mike 5y agoI agree. I think the single-page .vue model is also really amenable to whitespace and consistent formatting.