3 ms·
> Bit strings of arbitrary length, with bitwise Boolean operations plus substr and catenation This one actually piqued my interest in PL/I recently. Closest th
by the_only_law 5y ago
> Bit strings of arbitrary length, with bitwise Boolean operations
plus substr and catenation
This one actually piqued my interest in PL/I recently. Closest thing I’ve seen in modern languages is bitstrings in the BEAM.
- throwawayboise 5y agoYes I also thought of Erlang bitstrings when I read that.
- p_l 5y agoI believe both Ada and Common Lisp also share this ability, though Ada has nice support in its type system for doing things like mapping a portion of mmio register as bitstring that gets further defined as new type (whether enum, or integer, or string etc.)
- the_only_law 5y agoIf Ada has something like this, I haven’t seen it yet, but I’d be pleasantly surprised to learn otherwise. I’ve heard about lisps having bitstrings support, but it was only briefly explained to me years ago and I haven’t seen it since.
- Someone 5y agoMost modern languages have the concept of “libraries” that one can “import” and that can extend the language’s feature set. For example, I don’t think C++ has such bit strings (the confusingly named bitset (https://en.cppreference.com/w/cpp/utility/bitset https://en.cppreference.com/w/cpp/utility/bitset) comes close, but don’t think it does the substr and concatenation parts. basic_string<bool> has those, but not the Boolean operations), but they can be added when needed.
- moonchild 5y agoAPL usually uses bitstrings, though that is an implementation detail. Then, I guess APL is not exactly 'modern' anymore...