24 ms·
Sir, Please Step Away from the ASR-33 (2010)
- yankcrime 5y ago"When I was a child, I used to speak like a child, think like a child, reason like a child; when I became a man, I did away with childish things. [..] Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods. I grew up and today I use monochromatic numerals." - Rob Pike
- michaelmrose 5y agoA great example of how very smart capable people can express silly ideas wherein they justify personal preference with bad logic. https://ppig.org/papers/2015-ppig-26th-dimitri/ https://ppig.org/papers/2015-ppig-26th-dimitri/ Code isn't arithmetic nor prose and the majority usage of highlighting is because people intuitively grasp that life is easier with highlighting. It is perfectly ok to have different preferences but one must be careful not to elevate a preference to a law built upon sand not bedrock.
- jedimind 5y agoI hypothesised that syntax highlighting just had to provide some tangible benefits just because of how it allows the brain to process lots of information with a quick glance. After having witnessed a few geniuses work and swear by no syntax highlighting, I started to doubt my thesis, so thank you for linking the paper. Maybe some people just perceive the syntax highlighting as cognitive overload although it's meant to achieve the exact opposite.
- walshemj 5y agoMaybe They want to try fixing syntax errors to old school way printed out fanfold paper and highlighter pens. narrator voice : They do not want to do that.
- Fnoord 5y ago(2010)
- nightfly 5y agoIf I wanna use something like a ™ I have to google how to enter it, or just google and copy the character. I don't want any extra glyphs in my code until it's just as easy to enter (at close to full speed) as the glyphs I already have access to.
- Symbiote 5y agoCompose, T, M. https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key
- arp242 5y agoI use the compose key a lot; when writing docs I tend to use → instead of ->, I use – instead of -, etc. I have an extensive XCompose set up for all this, and I find it very convenient. But it's still three keystrokes instead of one. I wouldn't really look forward to using × instead of *, ÷ instead of /, etc. all the time, even though I can type them here with relative ease the hassle increases the more you use it (I don't tend to bother with fancy “quotes” for example). I also don't think it really matters all that much. What's wrong with *? Sure, × looks nicer, but * is clearly the pragmatic choice.*
- aniou 5y agoBTW: there is another obstacle aside from typing issues: readability problems and similarities between operators and ordinary characters with computer fonts. In case of manually written math equations (or LaTeX-ones) operators are easy distinguishable from arguments. They have a different sizes too. For example, "result = axe" and "result = a×e" in many cases looks the same and, even in my browser, with font larger, than ones usually used by my colleagues, they are very hard to distinguish. Difference between "result a÷n" and "result a-b" can be spot easier, but it depends on two one-pixel dots. Ok that was only a mumbling of malcontent - in fact we all know that we all have a sharp, young eyes and we never will be tired or distracted, I'm pretty sure of that. ;)
- 5y ago
- lifeisstillgood 5y ago>>> world's second write-only programming language I am not clever enough to comment on the meat of the article but I love that quote :-)
- lowbloodsugar 5y agoGo hardly looks different than BCPL from 1967.
- arp242 5y agoThis is pretty much an intentional design choice. Fun fact: the first commit in the Go repository is from 1972. In B. https://github.com/golang/go/commit/7d7c6a97f8 https://github.com/golang/go/commit/7d7c6a97f8 Followed by a commit from 1974 to convert it to C, and 1988 to convert it to ANSI C: https://github.com/golang/go/commit/0bb0b61d6a https://github.com/golang/go/commit/0bb0b61d6a https://github.com/golang/go/commit/0744ac9691 https://github.com/golang/go/commit/0744ac9691 https://github.com/golang/go/commit/d82b11e4a4 https://github.com/golang/go/commit/d82b11e4a4
- fouc 5y agoSeems like this was done to pay homage to the roots of Golang. :)
- lowbloodsugar 5y agoWhich is horrendous. In the forty years since BCPL (go was 2008?) the best way we could coordinate groups of developers in developing applications is to type streams of ASCII text and save them on disk with 0x0A indicating "the human wants a new line here". FML. Imagine if, to change the graph of your Facebook feed, you had to checkout myname.person, add "friend Bob { ... }", and then try to commit it. But far more complex graphs of objects, classes, ASTs of implementation, sure, ASCII is fine for that. It's embarrassing is what it is. I'm not saying it's not hard to come up with something better, but it's been fifty fucking years now.
- astrange 5y agohttps://wiki.c2.com/?WorseIsBetter https://wiki.c2.com/?WorseIsBetter Your image computing system isn't better than text files, much like your online file storage system isn't better than emailing things to yourself.
- deleted 5y ago[deleted]
- imiric 5y agoI agree with the conclusion of the article; we should move past the requirements of a long-gone era of computing, but the suggestions provided don't feel like improvements to me. > Why keep trying to cram an expressive syntax into the straitjacket of the 95 glyphs of ASCII when Unicode has been the new black for most of the past decade? Because I don't have 143,859 keys on my keyboard. Having to type λ would involve either changing my keyboard layout or using some key shortcut. In either case I'd miss the benefit of muscle memory to just type `func`. I don't see ASCII as a hindrance, but as the lowest common denominator for being expressive in any language, computer or human (Romance ones at least). > Why not make color part of the syntax? Why not tell the compiler about protected code regions by putting them on a framed light gray background? Or provide hints about likely and unlikely code paths with a green or red background tint? Why should a compiler be concerned about how errors are displayed? You can already do these things with a program that reads the output and renders it as you wish. We could argue that the information should be available in a machine-readable format to avoid parsing text, but I don't see how a deeper integration of color would help. The things that I would like to see in the next 20 years of programming are: - Abandoning text files and filesystems as an abstraction. Most programming languages are fine with handling only "modules", so having to manage files and file paths just feels unnecessarily clunky. Light Table[1] attempted something like this IIRC, where you only dealt with functions or modules directly, and it was a joy to use. Expanding this to a language would simplify things a lot. - Speaking of which, code versioning systems should abandon that concept as well. It's 2021 and the state of the art is still diffing pieces of text and doing guesswork at best to try and complete an automatic merge. Our versioning tools should be smarter, programming language aware and should minimize the amount of interaction they require. I can't imagine the amount of person-hours ~~wasted~~invested on trying to understand and make Git work. - Maybe just a fantasy and slightly off-topic for this discussion, but I'd like to see more programmer-friendly operating systems. With the way Windows and macOS are going, Linux is becoming more like the last bastion for any general programming work. Using these systems often feels like the computer is controlling me rather than the reverse. [1]: http://lighttable.com/ http://lighttable.com/
- rini17 5y agoI can't agree with the conclusion when he does not even try to guess at the reasons for status quo, only the offhand remark "computer people are conservative". Perhaps the text with limited alphabet and fixed-width display is actually optimum both for programmers' mental workload and for computer processing? Why the urge to abandon it? Many many people tried to "move on" but there's always some catch. I like DRAKON graphical programming editor but it makes diffing harder and merging changes from outside impossible.
- aliasEli 5y agoThe article's title uses "ASR-33" instead of "Terminal". Actually I think most users called it a teletype.
- eterevsky 5y agoThe best thing about using only ASCII for the main syntax is that everyone can type it with their keyboard. I think the recent fad of supporting Unicode identifiers is misguided. Of course, Unicode should be permitted in string literals, but not in the code itself. *Also I don't think Go is better than modern C++, though it might be better than C++99 which was the main standard when the article was written.
- wutwutwutwut 5y ago> The best thing about using only ASCII for the main syntax is that everyone can type it with their keyboard. My keyboard doesn't have a key for NUL, BEL, VT, EOT. What kind of keyboard do you have which has buttons for these?
- zabzonk 5y agoWith vim at least, you can type them in as control-key sequences (preceded by Ctrl-V).
- wutwutwutwut 5y agoBut then the statement is incorrect. I can write all of Unicode using keyboard sequences as well. People from US seems to have a strong fetishes with ASCII.
- hnfong 5y agoASCII is an abbreviation for American Standard Code for Information Interchange after all.
- eterevsky 5y agoLet's not be so pedantic. I meant visible ASCII symbols, character codes 32-126 plus newline.
- wutwutwutwut 5y ago
- lucsky 5y ago> My disappointment with Rob Pike's Go language is that the rest of the world has moved on from ASCII, but he did not. Um, the Go reference explicitly states that "Source code is Unicode text encoded in UTF-8" [1], so I'm not sure what the hell this guy is talking about. The language itself maybe? Well contrary to the author of the article I'm really no fan of Rob Pike and I think he's a massive arrogant prick, but in this particular case he was absolutely right to be pragmatic for the language syntax and let people be stupid enough to use inaccessible characters in their source code. Which, come to think of it, actually flies in the face of the root principle of Go as stated by Pike himself, which is to shield dumb rookie Google developers from their supposed inexperience. [1] https://golang.org/ref/spec#Source_code_representation https://golang.org/ref/spec#Source_code_representation
- ggm 5y agoThis feels a bit gratuitously rude. He has strong opinions, and literally decades of experience. He is said to dislike time wasters. As one of a very small set of people who built much of the modern development stack from the ground up, it would be tedious in the extreme to have to deal with every headstrong tyro determined to make their (likely highly pedestrian, repetitive) point. Never met him, never really dealt with him, don't see why you feel you need to denigrate him.
- lucsky 5y ago> This feels a bit gratuitously rude Agreed, and I 100% believe that meeting him in person would most likely change my mind. I also 100% believe that he has every right to be an "arrogant prick" for all his contributions and achievements to the field. But that doesn't make him any less insufferable, unfortunately.
- nsajko 5y agoYou're missing the point. You're just throwing insults around (again in this comment), without even letting HN readers know what are you referring to. Why do you think Rob Pike is an arrogant prick, or insufferable? Also note that HN has guidelines: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- bartq 5y agoThis will work once we have keycaps with e-ink or similar technology and this will be super cheap for everyone. Then we all will have keyboards with infinite number of characters and new chapter of typing will begin.
- amelius 5y agoAnother idea: let the Windows-key (I have no use for it anyway) trigger the appearance of an onscreen palette of glyphs, which you can click with the mouse.
- devetec 5y agoDoesn't something like that already exist: Lenovo's Yoga Book C930? It had 2 screens, with one being an e-Ink keyboard. Very useful tech.
- tomxor 5y ago> Why keep trying to cram an expressive syntax into the straitjacket of the 95 glyphs of ASCII when Unicode has been the new black for most of the past decade?? Because it must be possible to actually type syntax. The problem is a physical one: keyboards are limited in space, we need alphabets, punctuation, a bunch of control keys, and finally we have a very small amount of space left to fit some arbitrary symbols - might as well be ASCII ones. The only way to truly break away from the ASCII table would be to start making giant non-standard keyboards... and now you have a huge inclusivity barrier, not to mention the impracticality of physically huge keyboards. This all seems like a lot of effort and argument over something even more superficial than language syntax - they are only glyphs... how does using more and different glyphs substantially change anything?
- swiley 5y agoVim supports entering quite a lot of symbols that don't exist on most keyboards (like the integral symbol.) I always have to look up how and that forces people to use editors which support that. >And, yes, me too: I wrote this in vi(1), which is why the article does not have all the fancy Unicode glyphs in the first place. Maybe vi doesn't but as I said, I've used them in vim. Also, the title calls out terminals but I don't have any VTE software installed that doesn't have Unicode support.
- AnimalMuppet 5y agoEven if it's possible to type the syntax, there's also the speed of typing. How fast can I type "omega"? Pretty fast. How fast can I enter a unicode omega code point? Probably not as fast. How fast can I read "omega"? Pretty fast. How fast can I read an actual Greek letter omega? I don't read Greek, and my physics classes were decades ago. Yeah, I can figure out that it's an omega. It might take a bit, though...
- TazeTSchnitzel 5y agoA programming language designed by a Mac user might make use of the symbols §, ±, ≤ and ≥, among others. I think the tyranny of ASCII is really the tyranny of the tragically poor support for entering characters beyond a small national-language set on the commonly-used OSes, especially Windows. (macOS is significantly better here but no utopia.) Windows-1252, MacRoman and so on may not be the standard character sets any more, but you wouldn't know it from what the OSes make easy to type!
- qart 5y agoI don't think there is any tyranny in any of the modern OSes. They all let you type in many languages. Maybe the feature is not enabled in some UIs, so newbies don't learn it. Linux users can use IBus or fcitx5. I often type in ಕನ್ನಡ and हिंदी when chatting with people. Typing emoticons and obscure math symbols is just as easy.
- jeroenhd 5y agoCharacter inputs will always differ between platforms and the most common denominator will always end up being popular for text input. Most of the world is on Windows, so most of the world will use Windows text input. From that input, a limited subset of characters will be used for common expressions, because many people simply don't know they can write the ¬ symbol. Does it make sense to use that instead of the exclamation mark for negation? I don't think so. The US International keyboard has loads of other characters currently not used in programming languages either, whether it's the ¡¿, the ²³ powers, the euro character, guillemets («») or the negation character. If Apple would decide their next Swift project will use the characters only quickly accessible to Apple users, it'll be treated just like that, only accessible to Apple users. With Apple shipping keyboards that have the £ character where the # character would otherwise be, I wouldn't be so sure if using all the available characters would blow over well. With ligature support being in every major IDE there's very little reason to step away from the old comparison operators in my opinion. What OSes make easy to type depends on where you live. It can be quite a challenge to write the Spanish ¿? style operators repeatedly, but there's no reason not to use, for example, ¿expression? instead of parentheses for "if" "switch" statements, or to use ¡expression! as a shorthand for "return". Format strings could just as easily have been written as «string» or „string”, but the characters on the American English keyboard were chosen because they were available on most layouts or out of pure laziness. I personally prefer US International over Apple's layout. I rarely need to use the paragraph key in normal text processing, and the short shift makes for a very awkward typing experience for me. The vertical enter also just seems like a waste of space to me. I don't really see how Apple's keyboard input is that much better than Windows', their special character set seems just as arbitrary as the rest. Adding more special characters found in US English only makes the situation worse for people on, for example, Italian keyboards or Polish keyboards, where despite writing in a language based on the Latin alphabet, characters with additional diacritics and such are part of the main layout and deserve separate keys. Cyrillic keyboards are just as bad, lacking most programming characters already because of the larger Cyrillic character set, although they'll have to cope with unaccessibily because of the character set difference anyway. In my opinion, the amount of special characters used in a programming language should be reduced, not increased. Backticks are already impossible to find on some keyboards, bbut languages like Javascript have gone and used them for format strings anyway. Driving people to learn a special "programmer's" keyboard layout just because the required characters aren't on their native keyboard layouts isn't a good thing. We want more compatibility, not less.
- nanis 5y agoThis really made me smile: > Programmers are a picky bunch when it comes to syntax, and it is a sobering thought that one of the most rapidly adopted programming languages of all time, Perl, barely had one for the longest time. The funny thing is, what syntax designers are really fighting about is not so much the proper and best syntax for the expression of ideas in a machine-understandable programming language as it is the proper and most efficient use of the ASCII table real estate.
- ilaksh 5y agoPeople should listen to this guy. He's got some perspective. The main reason we keep things the way they are is something like tradition, or some kind of psychological effects where we want to fit in. Whatever it is, it's not reason. All the rationalizations come after. Definitely should be able to put functions in the horizontal space, use colors as part of the syntax, use Unicode symbols where it is warranted. I would go farther and say that we should have at least some ability to edit things in a non-serialized way, like a WYSIWYG math formula for example. I hope people will also explore structural program editing. https://en.m.wikipedia.org/wiki/Structure_editor https://en.m.wikipedia.org/wiki/Structure_editor Almost forgot, one more crazy idea: switch to larger instantly reconfigurable touchscreen keyboards to allow more symbols to be entered easily.
- arh68 5y agoI've recently dipped my toe into APL, and I tend to agree. APL only really advances from lines of ASCII text to lines of Unicode text. It's still very line-oriented. If Unicode expands toward Tex/LaTeX/&c it could look a lot more like written math. Subscripts are nice, but there's more to it. Unicode entry is so poorly supported on macOS & Windows it's really not funny. Emacs (C-x 8 ENTER) is my best bet, or Xah Lee's website &c. If one were to design a new APL, one would be tempted to just use the few characters Apple lets you type with an Option or Command key. (and of course I can't easily type those symbols so I refer to them by six letters each—that's likely not going to change) All APL needs though (EDIT: and really I mean any language, as long as we have common sequences), is leader key sequences. Rho is `r. To me, it always will be. The interface [1] has this down pat. We should be able to type anything in Unicode with just a few of the 104 keys. Like how T9 allows 12 buttons to type 26, &c. The world is never going to build a 12,000-key Unicode keyboard. We're going to have to use leader sequences. Just my (beginner's) opinion. [1] even tryapl.org/ !
- PaulHoule 5y agoI use Unicode characters in Java identifiers as much as I can get away with; I wrote a code generator that embeds all kinds of funny brackets that are ‘meaningful’ as an emergent property. For entry I have symbols cut-and-pasted faster than most people type. Also the completion feature of the IDE works just fine.
- TinkersW 5y agoI noticed Rust added unicode support for writing code recently, does anyone know if it can be disabled per crate? I don't think having symbols that cannot be typed or pronounced is such a good idea..
- williesleg 5y agoGotta get chinky language
- dsr_ 5y agoIf it's not on the keyboard, nobody is going to type it. Solutions: a) only use characters in the intersection of the top N most popular keyboard layouts b) issue programmers' keyboards with an agreed character set c) issue programmers' keypads with supplementary characters d) add on-screen supplementary keypads
- phire 5y agoWhat we need is a programmer orientated IME.
- universa1 5y agoHmm, Julia begs to differ, with most editors replacing lambda with the lambda Unicode symbol for example.
- slver 5y agoUsing ligatures (of sort) in presenting code doesn't mean the code itself is not ASCII. Plus, let's see mainstream languages adopt this, I doubt they will. Languages do stupid things all the time.
- maxnoe 5y agoIt means in julia, the Editor and the repl actually replace \lambda with the unicode greek letter
- boublepop 5y agoI used to use Mathematica a lot and it was never an issue that the keyboard doesn’t have an integral sign or a lambda. You just type :int or :lambda and it displays as the proper character. When working with mathematical modeling it’s honestly just so refreshing and every other symbolic math solution in other languages feels decades behind. But alas Mathematica is proprietary and expensive enough that it’s always a management decision if you want to use it, so I never use it any more.
- Chris_Newton 5y ago
- techbio 5y agoBinary is too limiting; we need real number based transistors.
- macrolime 5y agoThe Unison language stores code as a syntax tree and they're planning to support multiple alternative syntaxes for the language. https://www.unisonweb.org https://www.unisonweb.org Unison’s core idea is that code is immutable and identified by its content. This lets us reimagine many aspects of how a programming language works. We simplify codebase management — Unison has no builds, no dependency conflicts, and renaming things is trivial. Some blog posts by the author of the language describing a bit of background https://pchiusano.github.io/2013-05-22/future-of-software.html https://pchiusano.github.io/2013-05-22/future-of-software.ht... https://pchiusano.github.io/2013-09-10/type-systems-and-ux-example.html https://pchiusano.github.io/2013-09-10/type-systems-and-ux-e...
- slver 5y agoIdentified by its content how?
- auggierose 5y agoHashing, like in Git I guess built-in things get fixed names / hashes, and the hashes of everything else follow from that. They need a mapping from content/hashes to human-friendly names, obviously. Not sure if they gained anything here, but they seem to think so, so might be worth checking this out.
- slver 5y agoI don't know why we keep reinventing this distribution model and failing at it, then trying again. Bugfixing and identity matter.
- fzzzy 5y agoUh, could you explain more? Your comment doesn't really give any clues about what you are complaining about.
- tyingq 5y agoSounds like C++ name mangling.
- slver 5y agoThe article's argument in a nutshell: We need to break free from the tyranny of the characters on our keyboard, and express ourselves using characters not on our keyboard. So I hope you see why that argument keeps failing.
- Avamander 5y agoYour keyboard is not my keyboard, nor everybody else's. So I hope you see how US-centric your view is.
- euffs 5y agoDid you just call Latin on keyboards "US-centric"? How exactly do you think someone, say, in Russia, types their Gmail address in a form? I feel you're the one accidentally revealing US-centric views.
- Avamander 5y agoYes. > How exactly do you think someone, say, in Russia, types their Gmail address in a form? They switch their keyboard to Latin, from Cyrillic. They probably prefer mail.ru though, because of such stupid limitations. Nice try though.
- slver 5y agoI've never been to the US. Before you hurl incorrect accusations at others, check out how international keyboards look. All have QWERTY-like (in some cases AZERTY etc. but still similar) layout as a BASE, and the local characters are on top of that. Yes even in China, Japan, Russia, Greece, Bulgaria, Macedonia and so on. This is why languages center around this charset, and why it'll stay like that.
- Avamander 5y ago> All have QWERTY-like (in some cases AZERTY etc. but still similar) layout as a BASE. But not the Latin charset as the single one that can be entered. Let's pick a random one on your list, Russia for example. Funny thing appears, it's clear that you haven't visited Russia for example, hint: Cyrillic on keyboards. Shall we continue? ASCII is not the world's default and never should be. And incorrect? No, maybe I should've just said narrow-minded instead of American.
- jotadambalakiri 5y agoWe literally have to: https://github.com/ASCII-Rightholders/the_characters https://github.com/ASCII-Rightholders/the_characters Unless, of course, we want to buy the not too generously priced license
- krylon 5y agoI'm fairly certain that is a joke. Or a very badly done scam. Either way, I doubt anyone can claim a copyright on ASCII.
- vitiral 5y agoI think it's good to think outside the box. Maybe incorporating some tried and true Unicode would make sense. However, I don't think the issue is ASCII but rather consistency. I'm making a C-competetor language and using "c-like syntax" except I'm enforcing consistency. () is always one or more statements, with the last expression returning the value. {} is always representing concrete data like a struct, array or function args/result. []? That's a piece of a type name, allowing the developer to name something Foo[U32; Str] fn foo: {a: U32, b: Str} -> U32 ( if a > 5 then b + "is greater then 5" else b + "lte 5" ) )
- loloquwowndueo 5y agoAlready done! Emoji code, emoji-based programming language ! https://www.emojicode.org/ https://www.emojicode.org/
- pharmakom 5y agoHere’s some F# let ``I emoji`` = true
- Zababa 5y ago> It was certainly a fair tradeoff—just think about how fast you type yourself—but the price for this temporal frugality was a whole new class of hard-to-spot bugs in C code. > Niklaus Wirth tried to undo some of the damage in Pascal, and the bickering over begin and end would no } take. "1970 - Niklaus Wirth creates Pascal, a procedural language. Critics immediately denounce Pascal because it uses "x := x + y" syntax instead of the more familiar C-like "x = x + y". This criticism happens in spite of the fact that C has not yet been invented." http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html http://james-iry.blogspot.com/2009/05/brief-incomplete-and-m...
- leephillips 5y agoThe author wonders, “But programs are still decisively vertical, to the point of being horizontally challenged. Why can't we pull minor scopes and subroutines out in that right-hand space and thus make them supportive to the understanding of the main body of code?” Which made me wonder if there might be some way to make an editor do something along these lines, without changing the programming language. Similarly with his speculations about using color.
- Zababa 5y ago> And need I remind anybody that you cannot buy a monochrome screen anymore? Syntax-coloring editors are the default. Why not make color part of the syntax? Why not tell the compiler about protected code regions by putting them on a framed light gray background? Or provide hints about likely and unlikely code paths with a green or red background tint? I'm colorblind, please never do that. Syntax highlighting is fine since it's another way to help, but color having some kind of importance so that pink code and violet code run differently would be hell for me. Edit: something else: color looks different depending on your computer. Consider how many complaints I already see here about people developing UI for extra wide monitors while most people are on 15 inches screen, that would be terrible. Don't even get me started about arguments on "is this blue, blueish green or green?". Colors are way more subjective than what people seem to think. > For some reason computer people are so conservative that we still find it more uncompromisingly important for our source code to be compatible with a Teletype ASR-33 terminal and its 1963-vintage ASCII table than it is for us to be able to express our intentions clearly. And no new letters have been added to English or French lately. They seem to be doing just fine. Typing those new symbols would be hell if keyboards are not designed for it.
- nmz 5y agoColorforth not only does this but solved the colorblind problem by switching fonts.
- Zababa 5y agoI don't think colorforth "solved the colorblind problem" considering it has almost no adoption. Does anyone except Chuck Moore uses it? It has a fallback for colorblind people, which is better than nothing but is still terrible. The current way, plain text with everyone free to use syntax highlighters that change the color, font, or anything of the text is fine and works very well. I've heard about AST-based source of truth, and I think this could fix syntax mistakes while still allowing people to edit plain text as they wish (and could also simplify visual programming tools. Maybe unlock a smooth transition from low-code tools to regular code?).
- phkamp 5y agoI wrote this, and I'm here if you have questions.
- rm445 5y agoThis isn't the kind of article people have questions about - everyone is ready to jump in feet-first with strongly-held opinions! I thought the article was fascinating and thought-provoking, I hope all the strongly-worded opinions aren't causing you to regret it. I was also wondering whether tokenizer rules deserve some flak for making it harder to build identifiers and operators? Why is it more important (in C-like languages) for programmers to write without spaces, than to be able to call a variable ready? or define a +++ operator?
- phkamp 5y agoFar from, if anything the opposite. I mainly write this kind of stuff to make people think about what they would not otherwise have thought about, with the secondary goal getting at chuckle or two along the way. This particular one have been discussed on HN previously and every time the "beause ASCII == keyboard" argument have come up. ...and been slapped down by people from the rest of the world, who have two or even three keystroke sequences to reach [\]{|} etc, because more important national characters, like æøåÆØÅ lives on the "usual" keys. If I managed to get people to think about that, I've done my job. As for C: I think the C lanuage has been mismanaged, why did we need yet a threading API, while we still dont have explicit struct packing, including per struct or per field endianess specification ? The ISO-C Group is incredibly conservative, which is plain wrong: A finite amount of C code have already been written, but there is a potentially infinite amount yet to be written. They should focus on the larger oeuvre.
- drpixie 5y agoI'd love to use unicode on a current project - but just the unicode library is bigger than the memory of the small computer being used :( Seriously, unicode is appallingly messy and heavy-weight. With all that code-point space to burn, a rational design would be very different to what we've got.
- slx26 5y ago>> For some reason computer people are so conservative [...] Well, one of the underlying reasons for the lack of imagination might be... keyboards. If keyboard keys were small e-ink displays, easily configurable and accessible by programs, programmers would have come up with a lot of interesting stuff already. We do it with function icons in regular interfaces. If we could intergrate with keyboards, we'd definitely take advantage of it. Now, there might be many more reasons. The article also mentions subroutines displayed horizontally and other stuff. That could definitely be done too, but... while we aren't there yet, many interfaces definitely make good use of horizontal screen space. The main problem is that to do any of these, you kinda require coordination beyond the scope of solving a single technical problem. Unless the right hardware is available to enough people, custom symbols and keys and whatever would only work experimentally. And it would be a worthy experiment, but developing a language is already enough work to also have to add a custom revolutionary IDE to the mix, in the context of experimentation. In the current economic system, when the path to market is long and unclear most good ideas die anonymously.
- breck 5y ago> If keyboard keys were small e-ink displays, easily configurable and accessible by programs, programmers would have come up with a lot of interesting stuff already. The touchbar on my M1 Macbook Pro does this. It makes using Emojis a lot easier. I incorporate emojis into my languages more and more nowadays.
- xienze 5y ago> Well, one of the underlying reasons for the lack of imagination might be... keyboards. That and the fact that it would probably take me longer to search for whatever obscure mathematical symbol is supposed to represent <whatever> than it would take to just type out its name. And ASCII is just easier to deal with.
- WalterBright 5y agoAnother problem with Unicode is far too many symbols for different Unicode characters are too similar looking, or even identical. Then there are the Unicode symbols that convey semantic information rather than just the appearance. These are an abomination and should never have been put in Unicode, but here we are anyway.
- deleted 5y ago[deleted]
- lisper 5y ago> How desperate the hunt for glyphs is in syntax design is exemplified by how Guido van Rossum did away with the canonical scope delimiters in Python, relying instead on indentation for this purpose. What could possibly be of such high value that a syntax designer would brave the controversy this caused? A high-value pair of matching glyphs, { and }, for other use in his syntax could. (This decision also made it impossible to write Fortran programs in Python, a laudable achievement in its own right.) The irony here is that Python does have an open-scope delimiter. It is the colon. What it lacks is a close-scope delimiter. But you can hack one using the PASS statement and emacs auto-indent, and in my code I do this so that my Python code always auto-indents correctly. Without this you cannot reliably cut-and-paste Python code because you can't count on leading white space being correctly preserved.
- cletus 5y agoYeah, this couldn’t be more misguided. It would be the very definition of a boondoggle. The key point here is chunking. Mentally you can process the + as a plus sign. It’s been single concept. It’s association with addition probably means the reader can make useful inferences about what it does. Now consider the Greek letter ζ (zeta). For anyone unfamiliar with that it would be more than one chunk as you would probably try to remember the shape. Worse, you may have no idea how to input it. And to get any of this we’d have to deal with encodings. For what, exactly? And sure, not everyone is familiar with the Latin script that dominates ASCII but you have to pick something and for better or for worse English is the lingua franca of programming. And don’t even get me started on the insanity that is Unicode attempting to assign a code point to every symbol ever imagined and then extending that with compound code points and modifiers.
- foxes 5y agoEmoji symbols for some funky new Haskell function, why not. type (@@@#@$$$) Could definitely be made more compact :).
- mseepgood 5y agoGo was designed by Ken Thompson, Robert Griesemer and Rob Pike. The article makes it sound as if Go was designed by a single person.
- Const-me 5y ago> Why do we still have to name variables OmegaZero when our computers now know how to render 0x03a9+0x2080 properly? Majority of developers are not from Greece; they don’t have the keys on their keyboard. Technically, modern C# supports Unicode just fine, here’s an example. using System; using System.Collections.Generic; using System.Linq; static class Program { static double Σ( this IEnumerable<double> elements ) => elements.Sum(); static void Main( string[] args ) { double[] α = new double[ 3 ] { 1, 2, 3 }; Console.WriteLine( α.Σ() ); } } > Why not make color part of the syntax? Similar reason, because input becomes more complicated. You gonna need to either memorize hotkeys, or reach for the mouse. Also copy-pasting UX becomes way too complicated.
- deleted 5y ago[deleted]
- imvetri 5y agoWow. The same thing I was thinking about. We built a fundamentally flawed system when it comes to ASCII, strings and human languages. Computer language needs to abstract time and space representation. Solving will improve human - computer interfacing problem. Connect two worlds with commonality, humans writing instructions is not that. MOV command is the single source of truth. It does something with space and involves time. Start there and build upwards.
- WalterBright 5y ago> we still find it more uncompromisingly important for our source code to be compatible with a Teletype ASR-33 terminal and its 1963-vintage ASCII table than it is for us to be able to express our intentions clearly. D is a fully Unicode language - comments can be Unicode, the builtin documentation generator can be Unicode, even Unicode characters in the identifier. I've been tempted to add Unicode characters for operators many times. The trouble is the keyboard. I've seen many ways to enter Unicode. I even invented a new way to do it for my text editor. All awkward and unsatisfactory. No way to touch type them, either. What is needed is a dynamically remappable keyboard, with a configurable display on each keytop so you know which letter it is. Nobody is going to remember what the remapped letters are without it.
- guenthert 5y agoIt's a terrible idea. Sooner or later there will be identifiers with homoglyphs. Good luck debugging that!
- smasher164 5y agoSupporting unicode doesn't mean you can't defend against homograph attacks. See http://www.unicode.org/reports/tr39/ http://www.unicode.org/reports/tr39/.
- guenthert 5y agoI quote from that reference: As discussed in Unicode Technical Report #36, "Unicode Security Considerations" [UTR36], confusability among characters cannot be an exact science.
- vincent-toups 5y agoThis really strikes me as a "not even wrong" post. I'm not sure there is anything wrong with programming and if there is something wrong with it, the problem sure isn't "there are not enough operators." My favorite languages don't even have the _idea_ of operators and in languages with custom operators, with all their crazy ass rules about precedence and content-free representations, I'm always re-translating the code to s-expressions in my mind. The Scheme way seems fine to me - operator-like functions when the meaning is universally understood and then human-readable names for literally everything else.
- ta988 5y agoWhy not just use ligatures? For example => turns into an arrow in some fonts. This could likely be extended. I think the major issue is with accessibility. How do we make sure whatever solution can be used by most?
- moomin 5y agoMost people who think they see ASCII dependence are actually perceiving standard keyboard dependence. Modern keyboards all ape the Model-M and all modern programming languages are constrained by Model-M compatibility. ASCII is an implementation detail. Very few “radical ideas” for programming language formats pass the “easier to use than typing” test, let alone the “so much easier it might merit jumping off path dependence” test.
- dang 5y agoDiscussed at the time: Programming languages have to break free from the tyranny of ASCII - https://news.ycombinator.com/item?id=1850938 https://news.ycombinator.com/item?id=1850938 - Oct 2010 (116 comments)
- bborud 5y agoAs much as I admire Mr Kamp's work, I think this is nonsense. Just because something looks familiar doesn't really mean it is the same. There are good reasons to pick syntax that is familiar. Novelty comes at a cost. And I also think he is wrong if he thinks languages will be improved by making them harder to type and read. I've spent a considerable amount of time trying to understand code written by someone in China. All the comments in that project are Chinese - which I don't understand. Now imagine using symbol names in Chinese. Or Hangul. Or Russian. Or in Baybayin script. Or Sanskrit.
- vajrabum 5y agoMost of that makes sense but it's worth remembering the ASR-33 was upper case only!
- timonoko 5y agoPython could be variable font language. The more you indent, the smaller the font gets. You could always see the whole program on one page. Editor would zoom automatically of course.