[erlang-questions] Bit Syntax and compiler Erlang/OTP R21.1
Wed Aug 21 02:06:56 CEST 2019
Valentin Micic wrote
:> If you cannot write 17 loose bits to a file, or,
:> better yet, if you cannot send 13 loose bits over a socket,
:> one has to wonder how useful are non-aligned bitstrings
This is a very odd thing to say. PL/I has had bit strings
since about 1965. Common Lisp has bit strings. Some Scheme
implementations have bit strings. APL has bit arrays of any
size and shape. SQL 92 had BIT(n) and BIT(n) VARYING just
like PL/I -- surprise surprise -- but SQL 2003 dropped them,
while Postgres still supports them. Ada has bit strings,
in the guise of packed arrays of Boolean, replacing Pascal's
sets (which are fixed size bit strings). Do I need to point
to bit string support in Java and C#?
You may not be able to send 13 loose bits over a socket, but
you *can* have a 13-bit field in a packet, and why should it
be hard to construct that 13-bit field or to pack it? And of
course if you are running Erlang on a Raspberry Pi, you can
send or receive a message of *any* number of bits through the
Pi's GPIO pins (with the aid of a NIF).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions