7 ms·
I wish ASCII had a few more symbols and didn't waste 32 values on control codes. Missing characters imho: fixed width space, degree symbol, copyright/trademar
by Aardwolf 8y ago
I wish ASCII had a few more symbols and didn't waste 32 values on control codes.
Missing characters imho:
fixed width space, degree symbol, copyright/trademark symbols, the opposite direction of `, maybe a few more like pilcrow, section symbol, dagger, generic currency symbol, card suits, arrows and a few mathematical ones like +-, roughly equal, not equal, ...
Why I care about ASCII here? Because programming language source code is still written in that, and it's also those symbols that appear on standard US keyboard layout.
I think those extra symbols would have made life easier in many cases, more than some of the more obscure control characters it has (such as the useless line break vs newline we are still suffering from). They could have gotten away with just 16 instead of 32 control characters imho, even in the times when they had mechanical machines with bells :p
- vidanay 8y agoControl characters are still extremely common in embedded codes such as DataMatrix or QR Code. https://www.gs1.org/standards/barcodes https://www.gs1.org/standards/barcodes I would extrapolate that RFID uses similar encoding, but I have no experience there.
- dfox 8y agoCode128 has special control symbols that are distinct from ASCII control characters which are used for framing/formating in context of GS1. Datamatrix also has special symbol that is equivalent to FNC1. The fact that scanners often encode FNC1 as some arbitrary ASCII character, with GS and ^ being common choices or even reformat the data to something resembling the human readable representation (ie. "(01)..." instead of FNC1 0 1 ...) is only about the scanner interface. But IIRC QR code does not have any special out-of-ASCII control symbols and GS1 structures are encoded with ASCII GS instead of FNC1.
- jperras 8y ago> more than some of the more obscure control characters it has It's perhaps an oddity now, but these control characters were most definitely necessary when ASCII was formalized in the 1960s from teletype machines.
- claudiawerner 8y agoI made a flat file database for an imageboard script a couple of years ago in which I found a lot of value in using the control characters, to separate the content of posts (group separator) and the attributes of a post within that (record separator).
- nothrabannosir 8y ago> Why I care about ASCII here? Because programming language source code is still written in that, and it's also those symbols that appear on standard US keyboard layout. None of the programming languages I've used in the last ten years, save perhaps brainfuck, used ASCII. It was all unicode, either through explicit configuration atop the source code file, or e.g. UTF-8 by default.
- Aardwolf 8y agoI mean core language keywords and operators, not strings or custom variable names. The core set is limited set for good reason, but a few more symbols could have helped, e.g. degree symbol is very common and could have been used for angles. Did you know in C++ you can have a variables named as emoji? It compiles with clang++ with -std=c++11 :) APL is a famous non-ASCII based programming language using arrows and such, but very difficult to type on a modern computer of course. Other than esoteric languages, I don't know any modern programming languages using non-ASCII symbols in core keywords and operators.
- lalaithion 8y agoHaskell has Unicode synonyms for many of it's constructs (enabled by a compiler flag), so you can write eg. → instead of `->` and ∀ instead of `forall`.
- aduitsis 8y agoPerl6 too.
- lizmat 8y agohttps://docs.perl6.org/language/unicode_ascii https://docs.perl6.org/language/unicode_ascii for a list of Unicode characters in Perl 6 and their ASCII counterparts.
- pmarreck 8y agoI get that "for free" via programming ligatures: https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode Depending on your (irrational) feelings about fonts and typography, this may either be the most amazing advance in coding readability you've ever encountered, or a mild improvement, or even annoying. But I love them! A number of coding-oriented fonts support them now: https://medium.com/larsenwork-andreas-larsen/ligatures-coding-fonts-5375ab47ef8e https://medium.com/larsenwork-andreas-larsen/ligatures-codin... also, small grammar niggle: "it's" should only be used where it can be replaced with "it is" and still make sense; otherwise it's always "its" :)
- dpark 8y ago> Why I care about ASCII here? Because programming language source code is still written in that, and it's also those symbols that appear on standard US keyboard layout. > I think those extra symbols would have made life easier in many cases... How would it make life any easier? The fact that they aren’t in ASCII doesn’t mean they can’t be on the keyboard. That’s an entirely separate issue. European keyboards have lots of non-ASCII characters on them. Also as others have noted, programming languages are almost universally not ASCII. Though again I don’t know why you think that matters.
- pjc50 8y agoBit late now. Although MS-DOS default code page 437 did have the card suits in the control character space, and a few other of the ones you mentioned in the upper >127 half of the page.
- laumars 8y agoControl characters were essential back when ASCII was standardised. Please remember that ASCII wasn't just a text encoding standard, it was used for communication with external hardware as well. In fact due to the teletype legacy on modern terminals, we still use ASCII control codes now. eg killing an application via ctrl+c - that's sent as an ASCII control code and the receiving pesudo-TTY then interprets that as an interrupt signal. Backspace is also an ASCII control code. The point about cartridge return (CR) and line feed (LF) is an interesting one. From a purely text markup perspective it does seem insane to have two separate characters. However from the perspective of printing data on a teletype it makes total sense: you want one control character to bring the head back to the start of the line, and a second control character to feed the paper. In fact even on modern pseudo-TTYs (eg on Linux), you can still define whether you want CHR(10) to do both a CRLF or just LF - and in fact when programs do put the TTY into raw mode (eg readline, ncurses, etc) then preferred behaviour is to disable the auto-CR on CHR(10). The interesting thing is your point seems focused on keyboard layouts - and there's nothing stopping a keyboard from having characters that are not part of ASCII. eg UK keyboards have a pound sign (GBP) and that's not included in ASCII. Neither is the Euro currency character and that appears on some keyboards as well. I have no idea what ¬ (next to the backtick button on my keyboard) is called but that's not an ASCII character either. Navigation buttons on keyboards (left, right, home, page up, etc) are not ASCII characters. Nor are the function keys (F1 et al). Escape is though - and has proven to be quite an important control character too as it's used heavily for inlining data into TTYs via ANSI escape sequences (eg colours, cursor movement, etc). But getting back to the GBP and Euro point: there is no reason why you couldn't configure your own keyboard to map different keys to different code points outside of the ASCII range if you wanted to. Honestly though, some of your examples of missing symbols don't really make a whole lot of sense. How would card suits having an ASCII code help developers (or anyone for that matter)? Arrows I could see a benefit of and they do appear on some of the competing character encodings of the 70s and 80s. The opposite direction of quotation marks is a valid point to as they might help make it easier to write nested strings. However in terms of written text I'm more than happy having editors auto-fix straight quotation marks with their angled counterparts.
- Symbiote 8y ago> I have no idea what ¬ is called That's the logical not symbol, companion to ∧ (and) and ∨ (or). It's in ISO-8859-1 (and presumably the British keyboard layout) while the others aren't, since they can be made with /\ and \/.
- zlynx 8y agoI wish more people used those control characters. Instead of building CSV, TSV, XML and JSON / YAML files with more and stranger methods of escaping characters why didn't we use the already existing and perfectly fine control characters for File, Record, Group and Unit Separators.