3 ms·
Already in 1964 the language PL/I (still named NPL in 1964) had "bit strings" as a distinct type from integer numbers. Also "character strings" were a distinct
by adrian_b 4y ago
Already in 1964 the language PL/I (still named NPL in 1964) had "bit strings" as a distinct type from integer numbers.
Also "character strings" were a distinct type.
I also believe that these types must be clearly distinguished, even if conversion functions must be provided between them, and even if in certain contexts it may be convenient for the conversions to be implicit.
- gumby 4y ago> Already in 1964 the language PL/I (still named NPL in 1964) had "bit strings" as a distinct type from integer numbers. That’s because lots of hardware back then had support for bit addressing. The machine I love the best, the PDP-6/PDP-10 had addressable bytes of width ranging from 1-36 bits, which were extremely handy. The few C compilers for those machines didn’t support them of course because the PDP-11s didn’t support them, but C on the PDP-10 was only used for porting stuff anyway. Honestly I’m surprised they haven’t been revived. Packed bitfields are really handy and should be fast.
- kevin_thibedeau 4y ago> I’m surprised they haven’t been revived. ARM has bit addressing with their bit-banding feature where individual bits are mapped onto byte addresses.
- gumby 4y agoThat's handy, and I suppose much faster than mask & shift. But it's often handy to be able to stride through an array at, say, three bits at a time. When you have a very large dataset tricks like this can significantly reduce RAM and especially cache pressure.