Accept-Language headers aren't used in a particularly good way by browsers and servers. If used better, they would be a particularly good solution.
The idea you mentioned of browsers allowing the header to be set on a per-site basis would be particularly good.
Another very good solution would be for servers to assign weight to the languages they support, and to combine their weights with the Accept-Language weights to choose the best language in common.
But even as they're implemented and used now, Accept-Language headers are already a way better approach than geo-ip.
My hunch is that Accept-Language became the best way to determine a user's language about the time it became common to bring a laptop while traveling. People use arguments today against Accept-Language that have been wrong for decades.
I once insisted with an optometrist that they only take my insurance number and not my SSN. They contacted my insurance and the insurance sent them my SSN.
I can't avoid medical insurance having my SSN because of tax reporting requirements.
> They contacted my insurance and the insurance sent them my SSN
If all you're doing is making them get the information from someone else, what exactly are you accomplishing? Adding a bit of friction to a process?
I mean, fine, if that's the aim, but it sounds like this was intended as more of a “they don't need this information at all, and if you don't give it to them, then they won't have it” technique, and (apparently) that doesn't work.
That's distinguishing the String class from primitive string. I don't think that would still work with another `extends String` the same shape as Hash.
Or, a version that's more inline with the post you're replying to.
Just add an Email class that also extends String and you can see that you can pass an Email to the compareHash function without it complaining.
class Hash extends String {}
class Email extends String {}
// Ideally, we only want to pass hashes to this function
const compareHash = (hash: Hash, input: string): boolean => {
return true;
};
const generateEmail = (input: string): Email => {
return new Email(input);
}
// Example usage
const userInput = "secretData";
const email = generateEmail(userInput);
// Whoops, we passed an email as a hash and TS doesn't complain
const matches = compareHash(email, userInput);
> Deep sleep is not improved by consistent sleep/wake times, and adjustments to noise/temperature/light conditions?
Deep sleep definitely benefits from consistent sleep/wake times. Your body tries to play catch up if you break from your normal rhythm but it’s not entirely effective.
I think the parent comment might be exaggerating the futility of sleep hygiene because they have a product to sell. :) Proper sleep timing, duration, and sleep hygiene are inarguably valuable for proper sleep architecture.
I'm not saying sleep hygiene is futile, I specifically say it is important, and sleep hygiene improves the potential for deep sleep, it does not directly improve deep sleep.
Sleep hygiene impacts sleep duration, which can impact all phases of sleep. It impacts the sleep phase potential, which is different from directly impacting sleep.
Measuring only sleep duration is like measuring only how much time you spent at the gym, ignoring what exercises, weights and reps you did.
In fact, the lawsuits claim that RealPage shares "peer lists" with clients that tell them exactly who else is providing data to the company within a specific distance of their property.
This sounds like reassurance to a landlord that peers will mimic the same price moves. If true, I would call that price fixing.
You are hereby reminded that litigants can claim anything they want in a brief. The bar for sanctioning a party over unfounded claims is extremely high.
Another kind of marketplace that provides detailed information on the other bids and asks is ... every functioning marketplace you have ever heard of. Commodities, stocks, futures, farm produce, everything.
In all of those markets, both buyers and sellers have access to the asks and bids. For your analogy to hold, I think the market data needs to be freely available.
Does RealPage give this info freely to renters, or is it hidden behind a subscription or fee and meant for landlords only?
The idea you mentioned of browsers allowing the header to be set on a per-site basis would be particularly good.
Another very good solution would be for servers to assign weight to the languages they support, and to combine their weights with the Accept-Language weights to choose the best language in common.
But even as they're implemented and used now, Accept-Language headers are already a way better approach than geo-ip.