- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Twofers
- Two-faced
- Boxing Day Math
- Michael's Holiday Snaps
- Anonymice
- A Horse With No Name
- On the Dark Side
- Untimely
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I've been coding on and off in a variety of languages for about 40 years. I've given myself a headache even trying to figure out the logic in that code. I can only assume that R was developed as one of those weird, oddball, novelty languages like Whitespace of BrainF*ck and someone didn't get the joke.
Edit Admin
This isn't true. It either is cruft and tech-debt right from the moment it's written, or it accumulates cruft and tech-debt as modifications (of code or of requirements) stomp through it in their big clompy boots later.
Edit Admin
Sadly, R looks like it's a pretty serious trhing (but not seriously pretty, as seen here). See e.g. https://en.wikipedia.org/wiki/R_(programming_language).
But the thing of using arrow (<-) for ordinary assignment wouldn't faze me at all, seeing as how I've worked with a programming language with the most self-referential name of any programming language that I've ever encountered. Um. A P(rogramming) L(anguage). That one uses a left-pointing arrow character for assignment.
Admin
Modern ILE RPG is a work of art compared to R. It's wild to think people actually program in R.
Edit Admin
Indeed, arrow seems like the most logical assignment operator. Beginners often have problems with
=because it doesn't express directionality. In math, it's a symmetric operation.Edit Admin
Hi, I'm this Carl. A couple quick notes. The R language has both NA and NULL, and they do different things. The original reason for the "<-" operator is that a trillion years ago there were keyboard with a key that generated a "<-" symbol, and in fact R was not the first language to use that key as an assignment op. Finally, if you really want to hurt your head, download and read "The R-Inferno," which is an excellent book showing many of the twisted things one can do (or do wrong) in R. www.burns-stat.com/documents/books/the-r-inferno/