Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Most 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) 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.


I 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.)


If 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.


Yes I also thought of Erlang bitstrings when I read that.


APL usually uses bitstrings, though that is an implementation detail.

Then, I guess APL is not exactly 'modern' anymore...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: