3 ms·
Actually, I think that while there might have been some inspiration from APL, the basic reason is that ASR33 teletype machines have a backarrow character, whose
by radford-neal 10y ago
Actually, I think that while there might have been some inspiration from APL, the basic reason is that ASR33 teletype machines have a backarrow character, whose ASCII code is the one more commonly associated with underscore. That explains why for many years the underscore character was accepted as an assignment operator in R and S. The <- glyph is a synonym useful if for some bizarre reason you are not programming with an ASR33 teletype machine.
- jghn 10y agoThat's an interesting point and likely correct. The story I gave here was told to me way back in the day by RG himself, although the real reason R uses `<-` is "because that's what S does" and it's possible that the reason he was given wasn't 100% correct itself.
- riffraff 10y agoFWIW, the left arrow is also what smalltalk used for assignment, from wikipedia[0] In the original Parc Place image, the glyph of the underscore character (_) appeared as a left-facing arrow (like in the 1963 version of the ASCII code). Smalltalk originally accepted this left-arrow as the only assignment operator. [0] https://en.wikipedia.org/wiki/Smalltalk#Assignment https://en.wikipedia.org/wiki/Smalltalk#Assignment
- PhantomGremlin 10y agothe basic reason is that ASR33 teletype machines have a backarrow character, whose ASCII code is the one more commonly associated with underscore. When I read this I said "huh?" because I used ASR33's quite a bit in my youth and I didn't remember that. But, sure enough, the 1963 version of ASCII had the backarrow. It was replaced by underscore in the 1965 version. The backarrow would have been current when Iverson first developed APL. https://en.wikipedia.org/wiki/ASCII#Printable_characters https://en.wikipedia.org/wiki/ASCII#Printable_characters