Coder Social home page Coder Social logo

Comments (5)

nfultz avatar nfultz commented on June 24, 2024 1

couple thoughts

  1. the at sign is already taken for S4
  2. In python, it only works with def and not lambda. R's function works closer to lambda.
  3. You can already write "setter" functions eg how names()<- and class()<- work. They are not exactly the same, but could be used to do similar things.

from wishlist-for-r.

ColinFay avatar ColinFay commented on June 24, 2024 1

Would you be ok with explaining this to someone not knowing Python and that doesn't know what decorators are? :)

from wishlist-for-r.

lorenzwalthert avatar lorenzwalthert commented on June 24, 2024

Thanks @nfultz. I know it's already taken for S4, but I think it would be still possible, since with S4, it's always within an expression as far as I know, e.g. x@y, and never @y, e.g. as the first token on a line. Right? There are symbols in R that have multiple meanings depending on the context, e.g. + as an infix operator for two arguments or as a sign.

from wishlist-for-r.

nfultz avatar nfultz commented on June 24, 2024

from wishlist-for-r.

HenrikBengtsson avatar HenrikBengtsson commented on June 24, 2024

Potential related to this, is https://github.com/dirkschumacher/defmacro. It might provide a way to declare these this using R syntax.

from wishlist-for-r.

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.