5 ms·
…languages which are mad.. Reference to “Celestial Emporium of Benevolent Knowledge”?
by randrus 2y ago
…languages which are mad..
Reference to “Celestial Emporium of Benevolent Knowledge”?
- rwmj 2y agoIt was a sly dig at APL for using non-ASCII characters as regular operators. Actually I have no idea how those were implemented in the language. Presumably not as Unicode since APL predates Unicode by quite a considerable number of years. Does anyone know? As a meta-joke I was also considering: APL (j/k)
- mlochbaum 2y agoIn modern APLs a character scalar is just a Unicode code point, which you might consider UTF-32. It's no trouble to work with. Although interfacing with things like filenames that can be invalid UTF-8 is a bit of a mess; Dyalog encodes these using the character range that is reserved for UTF-16 surrogates and therefore unused. If you know you want to work with a byte sequence instead, you can use Unicode characters 0-255, and an array of these will be optimized to use one byte per character in dialects that care about performance.