Git Product home page Git Product logo

Comments (5)

csgillespie avatar csgillespie commented on September 28, 2024

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.

from efficientr.

csgillespie avatar csgillespie commented on September 28, 2024

BTW, thanks for the link to your site. Very nice.

from efficientr.

richelbilderbeek avatar richelbilderbeek commented on September 28, 2024

I don't teach my students how to do a proper coding style myself. I teach them about lintr and then expect them to have clean lints. Also @lintr-bot is well known to all of them.

I interpret the = for an assignment as a hint that I am looking at beginner code, even though I know some experts use it.

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!

from efficientr.

Robinlovelace avatar Robinlovelace commented on September 28, 2024

Here's my take from a teaching perspective: people get really muddled about the assignment issue and it's clear that <- is a relic to old code. I recently made the switch (following the lead from Colin and discussion for this book) and I can honestly say it's made my life better. Not much. But I save maybe 1/4 a second and finger dexterity each time I assign an object now. + it's WAY easier for teaching.

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.

from efficientr.

richelbilderbeek avatar richelbilderbeek commented on September 28, 2024

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 :-)

from efficientr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.