News for hackers. Stuff that matters.
Re:Autocomplete as an Interface (2015) by jodrellblank on Saturday January 18, 2020 @02:05AM (#22082874)
attemptHydrationAtCurrentPriority

Without knowing anything about React or what Hydration is, I’m suspicious of this name - “AtCurrentPriority” doesn’t sound like useful information, everything should happen at current priority otherwise what does the concept of a “current” priority mean?

In a shell you don’t list files in the current directory with “ls —in-current-directory”, because the current directory is what you get if you don’t specify anything.

Similarly, in a language with exceptions and a library with error results, “attempt” is a non-description; everything is an attempt by default, the interesting things might be things which somehow can’t or mustn’t fail.

This smells like it ought to be “Hydrate” and then have a version which can be specified at some other priority if that’s needed.

There are no comments on this comment yet.