
&lt;input type=“country” /&gt; - jacobr
https://shkspr.mobi/blog/2017/11/input-type-country/
======
tyingq
I have my doubts as to whether a generic solution solves this.

The author notes some issues, like using it for place of birth. Now you need a
temporal list for "countries that existed in year XYZ".

There are similar issues for shipping. Not everyone ships everywhere. If the
list is abstract and unknown to me, how do I whitelist/blacklist? Am I
supposed to know that Scotland exists in the list or not? What if it's for a
passport input? Does Scotland have it's own passport? How do I deal with
Taiwan without pissing off Chinese web site visitors?

Tldr: The list depends on context. I'm skeptical that a centralized list could
deal with commonly used contexts.

~~~
syncordie
An input list of all current passport issuing countries would be useful. The
Scotland problem doesn't arise as they don't issue passports (the UK does).

~~~
baq
what about taiwan? what about taiwan if you're in china...?

~~~
tyingq
I believe Palestine has a similar issue. They have passports, but few
countries recognize them.

------
petepete
There was an excellent article[0] in Smashing Magazine several years ago that
dealt with some of the complexities of country selectors.

For someone who lives in the UK, you never know whether a list will have
United Kingdom, Great Britain or England in it (I've come across all three),
and similar problems exist for countries that are known by more than one name
(eg Netherlands vs Holland).

And some sites break sorting by pushing certain countries to the top of the
list and breaking sorting completely.

There isn't a completely right answer, a standardised country selector might
work in some (most) circumstances for most people, but what if my list needs
Czechoslovakia or Zaïre? Then, a "simple" problem becomes much, much, much
more complex.

[0] [https://www.smashingmagazine.com/2011/11/redesigning-the-
cou...](https://www.smashingmagazine.com/2011/11/redesigning-the-country-
selector/)

------
Already__Taken
Classic simple problem that's impossible to solve.

The thought that web browsers support could solve this problem speaks volumes
about the kind of rate people _think_ software gets updated. You could never
trust input=country to be supported much less up to date thus it will always
be poly filled by some library. So why the false hope?

~~~
baq
this would have to be supported on the network level, something like DNS with
temporal querying for 'i was born in yugoslavia' type of forms.

~~~
heavenlyblue
But by the time this happens - there's a huge probability our browsers will no
longer be rendering any HTML.

------
Wintamute
Stopped reading at "mansplainers".

~~~
MBCook
How does this contribute to the discussion?

~~~
always_good
It was said in the original article, so I'd ask how that quip contributes to
their own point beyond inviting this exact conversation. It's a very socially
charged statement.

Do you also expect people to overlook a quip about gun control laws while
explaining how monads work in Haskell, or is that conversation off the table
because you embedded it inside another topic?

~~~
MBCook
I honestly don’t think the writer was trying to ‘invite this discussion’, she
made an offhand comment about her experience. I think people are _seizing_
this as an _opportunity_ to talk about their pet peeve.

The comment doesn’t add to the discussion about whether a country field would
be useful or how it could be implemented _at all_.

But anyway did you read the twitter thread? The writer proposed standardizing
a common function so everyone wouldn’t have to roll their own.

A number of guys responded with ‘here’s how to roll your own’ as if she wasn’t
intelligent enough to do that herself (and completely missing the point of the
tweet).

Do you have a better word for that behavior?

It wasn’t an offhand quip like your gun control example, it directly related
to the tweet she was talking about.

And yes, I would think most people could read an article without freaking out
that the two words ‘gun control’ were in there if they were off topic.

It seems sad to me that seeing one word in an article is enough to derail the
entire conversation because some people don’t like it. It’s not like it was a
call to violence or something like that.

~~~
lovich
The better word is "asshole". I've had similar condescending conversations
from women when I was at the laundromat because I guess they assumed a guy
would only be doing laundry in a direction circumstance. I didn't need to come
up with a gender specific word for behavior that any random human is likely to
exhibit.

As for this specifically, I doubt they corrected her because she was a woman.
Ask any question on stack overflow about a specific edge case and you'll get a
few people answering immediately about the general case and not your specific
problem.

------
snomad
Nice idea, but she outlined more than enough reasons not to do it. Political
(Israel-Palestine, China-Taiwan, Ukraine, etc).

In my limited experience with automating international shipping I seem to
recall UPS treats Guam, Puerto Rico, and US Virgin islands as countries (and
our local CRM treated them as states).

There are so many controls that HTML is missing - date pickers, menus, menu
flyouts etc.

------
donatj
Just do longitude and latitude. Show a map of the earth and let them drop a
pin.

There is no reasonable way to get the world to agree on a single list. I doubt
you could get browser developers to agree on a single list. For example Apple
listing Taiwan in Safari could get Apple kicked out of mainland China. There
is simply too much politics here to be tenable.

~~~
maxxxxx
I wonder how many people could find a country on a world map and drop a pin. I
bet it's not too many.

~~~
beojan
It would be much higher given it's their _own_ country.

~~~
pavel_lishin
You might be horrifically surprised.

------
DeusExMachina
One paragraph into the article:

> while also marvelling at the witless mansplainers

Yeah, let’s make every discussion about gender, shall we?

How about no?

~~~
dreta
I read that, stopped caring, and closed the tab.

------
vlucas
Good discussion, and it is certainly very nuanced.

The trouble of the developer having to create this list themselves is the
reason I made [http://devdata.io](http://devdata.io) \- so you could at least
have an easy starting point for all this data that is basically just
copy/paste.

------
baq
timezones are a similar topic in the context of managing them, except there's
less politics involved. i don't see how a global solution would look like, but
i'm sure china will want a different list than russia and the US will want a
different list from both of them, and that's only 3 countries out of 199 or
249 or however many are there at the moment (and then the temporal aspect
comes into play.)

~~~
masklinn
Timezones are downright trivial compared to this one, even if the heads-up can
be _very_ limited there's a central well-maintained database of them, and they
have fairly low context-dependence: some historical context (timezones can
"move around") and the socio-political context is limited to _changes_ to
timezones.

------
rplnt
Regarding the place of birth issue, I have never used the country I was born
with when some form asked for birthplace. Always used the present state, i.e.
in what country is the place I was born at.

Is that not common? Would you expect someone to write down GDR, USSR, or even
Constantinople? Or is it again the same issue that people want to use what
they like?

~~~
ubertaco
One use-case I can see where this would come up: ancestry/genealogy websites.
Someone's grandparents may have been born in the Soviet Union, not in the
modern Ukraine, from a cultural-historical standpoint.

------
darkhorn
There is web component for that
[https://www.webcomponents.org/element/Protoss78/country-
sele...](https://www.webcomponents.org/element/Protoss78/country-select)

~~~
seszett
It's yet another tangent in this topic, but there's something that bothers me
here, and in many things that try to handle multiple languages.

There are _47_ lists of countries in French (that's just an example, I guess
English and Spanish have as many of those) in the project that provides them
[0], including half a dozen or so just for different regions of France.

As far as I can see, almost of them are _exactly identical_ except for the
Canadian one (which has "Saint-Vincent-et-les Grenadines" instead of "Saint-
Vincent-et-les-Grenadines" among other things).

For English, en_US and en_UK have differences as meaningful as "Wallis and
Futuna" vs. "Wallis & Futuna". Arabic has 28 different versions, all strictly
identical.

English, French, Spanish and Arabic "version" alone make up 33% of all content
in the repo. What purpose does this serve? Who maintains these largely
meaningless lists? Who chooses which languages make it to the list, and which
regions do?

I'm as puzzled by that as I am by the choices people make about what countries
make it to their list of countries in select lists.

[0] [https://github.com/umpirsky/country-
list](https://github.com/umpirsky/country-list)

------
johansch
I'm mostly just impressed that HN allows brackets in the title...

~~~
jacobr
I had to edit and replace them with HTML entities, at first they were just
stripped.

~~~
johansch
Okay, now I'm less impressed :).

------
_rolf
This post looks funny in the Digg RSS reader:
[https://i.imgur.com/TNASB3p.png](https://i.imgur.com/TNASB3p.png)

------
jlebrech
now tie that to a SaaS that helps you manage those countries

