Hacker News new | ask | show | jobs
by withoutboats3 1205 days ago
This dual meaning definitely crossed my mind as I was writing.. it's unfortunate.

Whenever I encounter a dual like this I like to investigate the etymology. I assume the use in linguistics is by metaphor to its use in music, "the range of a voice or instrument." More broadly, the term register comes to us from the Latin for a list of items recorded, ultimately from a word for carrying. Maybe there's something to make of that in connection to each of these very different meanings, I don't know.

The problem with diatype is that register, although not an extremely common word, is I thought somewhat well known, whereas I've never heard of diatype. I've been known to overestimate how familiar words of this sort are to other people, though, so maybe they're equally obscure to most of my readers.

3 comments

My brain immediately jumped to musical register from your title, FWIW. So in my case, it worked well.
I first thought CPU register, ruled it out and then vocal registers, and finally formal speech registers in some foreign languages.
Funny... after I read about the registers of (natural) languages, that reminded me of the "registers" of pipe organs, which are quite similar in a way: it's still the same instrument, but sounds different depending on what register(s) you use. Except that in English these are called "stops" for some reason (as in "pull out all the stops" - which in the programming sense introduced in the article would mean a wild mix of programming styles, probably not something you'd want to see). Oh, well...
I immediately assumed the post would discuss some algorithm that rustc uses to allocate CPU registers, but I was puzzled because I thought that would be abstracted away by LLVM.
I don't know that it would have been better, but an option would have been to use one of the less ambiguous but less familiar terms, and define it in terms of the more familiar term early on. Something like, "diatype (register, in the sociological sense)".
> from the Latin for a list of items recorded, ultimately from a word for carrying. Maybe there's something to make of that in connection to each of these very different meanings, I don't know.

CPU registers carry values, musical registers carry tunes. (Or something very roughly along those lines, anyway; etymology is messy and complicated.)