<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Valentin Micic wrote</div><div class="gmail_default" style="font-family:monospace,monospace">   <br><div>:> If you cannot write 17 loose bits to a file, or,</div><div>:> better yet, if you cannot send 13 loose bits over a socket,</div><div>:> one has to 
wonder how useful are non-aligned bitstrings</div></div></div><div><br></div><div><div style="font-family:monospace,monospace" class="gmail_default">This is a very odd thing to say.  PL/I has had bit strings</div><div style="font-family:monospace,monospace" class="gmail_default">since about 1965.  Common Lisp has bit strings.  Some Scheme</div><div style="font-family:monospace,monospace" class="gmail_default">implementations have bit strings.  APL has bit arrays of any</div><div style="font-family:monospace,monospace" class="gmail_default">size and shape.  SQL 92 had BIT(n) and BIT(n) VARYING just</div><div style="font-family:monospace,monospace" class="gmail_default">like PL/I -- surprise surprise -- but SQL 2003 dropped them,</div><div style="font-family:monospace,monospace" class="gmail_default">while Postgres still supports them.  Ada has bit strings,</div><div style="font-family:monospace,monospace" class="gmail_default">in the guise of packed arrays of Boolean, replacing Pascal's</div><div style="font-family:monospace,monospace" class="gmail_default">sets (which are fixed size bit strings). Do I need to point</div><div style="font-family:monospace,monospace" class="gmail_default">to bit string support in Java and C#?</div><div style="font-family:monospace,monospace" class="gmail_default"><br></div><div style="font-family:monospace,monospace" class="gmail_default">You may not be able to send 13 loose bits over a socket, but</div><div style="font-family:monospace,monospace" class="gmail_default">you *can* have a 13-bit field in a packet, and why should it</div><div style="font-family:monospace,monospace" class="gmail_default">be hard to construct that 13-bit field or to pack it?  And of</div><div style="font-family:monospace,monospace" class="gmail_default">course if you are running Erlang on a Raspberry Pi, you can</div><div style="font-family:monospace,monospace" class="gmail_default">send or receive a message of *any* number of bits through the</div><div style="font-family:monospace,monospace" class="gmail_default">Pi's GPIO pins (with the aid of a NIF).</div><div style="font-family:monospace,monospace" class="gmail_default"><br></div><br></div></div>