38 comments

[ 4.2 ms ] story [ 85.7 ms ] thread
Interesting. Now I wonder why Java decided to go the other way with a reversed domain name for packages. E.g., com.company-name.package-name
well, for the same reasons the urls _should_ be the other way around, plus avoiding inconsistencies with other languages I guess (don't know what languages supported dot-named packages at that time, but I don't think they were the first ones)
In the initial implementation package names were literally mapped to a path with the equivalent of subst(".", "/").

So in that sense the java package names are based on the hierarchy of a filesystem.

Also, the method name goes to the right of the class name, so the only reasonable way to have a hierarchical name that reads in a single direction is to put the most general qualifier on the left and the most specific on the right:

com.mydomain.mypackage.MyClass.staticMethod()

Funny to think that if Twitter handles were fragments of email addresses they would be backwards:

com.twitter@holysee

---

By the way, this must be a mistake:

This is a clearly a byproduct of the right-to-left language of the designers of these systems

That language is math. Which, due to historical accident, was inspired by Arabic writing, rather than the Latin variety.
that sounds interesting, but i'm having a hard time getting my head round it. can you give an example where math is right to left?

[edit oh, numbers! thanks! i was thinking about algebra.]

Think of the standard addition and multiplication algorithms. You start with the rightmost place, right?
Think about basic math aka addition, subtraction, and multiplication work.

  1237 + 4567
  7+7 = 14 = 4
  3+6 + 1 = 10 = 0
  2+5+1 = 7
  1+4 = 5
  5704
That's right to left. If we wrote numbers left to right we the 1's place would be on the left.
Numeric notation is built right to left. To count up from 1 to 9 uses single digits, of course. Then to go from 9 to 10, the ones place increments and rolls over, and we add the new tens digit on the left, not the right.
Not sure, the numeric notation is little endian wheras DNSs are big endian.
That's the point. Numeric notation is right-to-left. It was around long before the concept of endianness.
What does it mean to be right-to-left? If it means that least significant values are on the right side and most significant ones on the left side, then domain names are left-to-right (as opposed to numeric notation).
He meant left to right. It was a [fixed]mistake in the article.
Not true, but close enough.

Even in Arabic, numbers are the exception, written from left to write.

انا من مواليد ١٩٨٦. I was born in 1986.

You will notice the number sequencing, although slightly different looking, is the same as in Western orthography. Why? Arabs took their numbering system from the Indians, and adapted it.

The only way in which it makes sense to talk about numbers being written "right to left" or "left to right" is when comparing the order of speech sounds to the ordering of numerals read. In English it goes from the biggest to the smallest: "420" ==> "four hundred and twenty".
Then German and Danish are neither left-to-right nor right-to-left, since 123 is einhundertdreiundzwanzig or hundredetreogtyve ("onehundredthreeandtwenty"), so that doesn't seem to work too well, either...
I think that you mean "numerals", not math in general.

In our system (and in the Arabic "Indian" system, as pointed out by a fellow reply) numerals are written with the least significative figure to the right, so in that sense it's like com.twitter@holysee.

However, the author has acknowledged that there was a minor error in the post, so this is a case of a retrofitted explanation :-)

In fact, notations do not have to be consistent about digit significance. See, for example, US dates (9/11/2001) or German (and Arabic) long-form of most two digit numerals, which are read backwards, as in "four and twenty blackbirds" (happy to be corrected about Arabic...).

The UK "Grey Book" email system (http://en.wikipedia.org/wiki/Coloured_Book_protocols) used email addresses the other way around (in the same timeframe that the UK was using a stack over X.25 as their internetworking protocol).

For example, a user at Imperial College (IC) would have been: user@uk.ac.ic, rather than user@ic.ac.uk as they might today.

Email gateways existed to convert between the different systems, but when all country codes were added to the internet, some addresses were simply ambiguous. (An address ending in .cs might be either czechoslavakia or a computer science department.)

The main email software responsible for this slicing and dicing was known as PP, which helps explain the excellent quote on ASR (alt.sysadmin.recovery) a few years later:

http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html [search page for "mail transfer agents"]

I wondered why the article didn't mention JANet-style addressing, or UUCP-style bang-paths, both of which lead to more specific elements on the right.

With the rise of NAT-traversal technologies, I find it a little disappointing that bang-path addressing hasn't been rediscovered and used with TURN.

Honestly I find it comforting that people who think that the solution to inconvenient addressing problems is more and different syntax haven't won the argument. :)
Indeed .. because the article was under-researched drivel.
JANET (the UK university network) had a NRS (Name Registration Service - similar to DNS) that worked from least-to-most specific. So Cambridge was uk.ac.cam instead of today's cam.ac.uk. There were gateways to talk to email servers on ARPANET and reverse the ordering - there's more on it here:

http://www.uknof.com/uknof7/Reid-History.pdf

Group hierarchies on USENET were from least to most specific, for example sci.math.num-analysis.
There are good reasons for both of these choices.

USENET was a taxonomy, at least in principle, although like any taxonomy of thought you ran into cases like sci.foo.bar and alt.foo.bar fairly often. A taxonomy should be read from general to specific.

Email addresses are addresses. The metaphor is a geography, which goes from the specific to the general.

Then we have URLS, which go from the specific to the general, hit a slash, reverse direction, and then explode into a bunch of hacked-on features.

Addresses goes from specific to general mostly in countries influenced by British empire. Because international standard require to put city and country at the end, many countries have addresses with mixed order: street, home number, apartment number, city, country.
There are many, many, many people in the world at valid addresses never touched by the British Empire. China, Japan, Indonesia, Brazil, &c.
So did URL get designed backwards then? Should we have cerf@example.com instead of example.com/~cerf?

id=5236146?item@news.ycombinator.com maybe?

Java Developers staring at com.domain.specific namespaces are somewhat preconditioned to examining this discrepancy.
When domain names were first used, there was no such thing as a URL. The end.
Too bad ICANN turned the opportunity to get rid of canned TLDs altogether into a massive sham and rip-off.
So, is the obvious response to find a way to change our URL paths to subdomains?

e.g. 5236146.item.news.ycombinator.com ?

Sounds interesting but not productive, to me.