-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assignment operator #34
Comments
Thanks for the feedback. I realise that "<-" is typically prefered to "=", but my preference has come from teaching. AFAIK, there isn't another language that uses "<-". Many people program in another language, C, python, Java, Scala, Javascript, Stan; and switching operator is a pain. I was teaching R to a bunch of C# programmers a few weeks ago. Their number 1 irritation was "<-"; when I mentioned that "=" did the same job, they loved it. We'll keep the issue under review before the final version. |
BTW, thanks for the link to your site. Very nice. |
I don't teach my students how to do a proper coding style myself. I teach them about I interpret the As a C++ programmer, I have no problems using different assignment operators at all, like I also don't have a problem with different bracket placements. Also, Hadley Wickham is a C++ programmer, who hasn't suffered at all. But, hey, feel free to ignore. It's just a minor detail of a possibly awesome book! |
Here's my take from a teaching perspective: people get really muddled about the assignment issue and it's clear that From a philosophical perspective: be the change you want to see in the world. I want fast-to-type, easy to read code, the style of which adapts over time in the same way that human languages do. |
Thanks for this friendly addition! Well, in the end we do not have to agree about every single thing, which is fine. I then just hope you like my other suggestions better :-) |
Can't use R operators in PHP
I find it peculiar to prefer
=
over<-
as an assignment operator. Sure, Yihui Xie his personal preference is mentioned, but AFAIK no coding standard recommends this.I copied my collected references about this topic from here to the references section below. Next to this,
lintr
(of course, that is Hadley's coding standard as well) will complain by default at this. Why not teach beginners (or pro's) the (AFAICS) golden standard, developing their own personal style later?Just my two cents, I think the idea of your book is awesome!
Reference
The text was updated successfully, but these errors were encountered: