Giter VIP home page Giter VIP logo

Comments (4)

stevengj avatar stevengj commented on May 23, 2024

Seems like this would have to be a 2.0 thing, if it's practical at all. We certainly can't change any of the existing infix operators to behave this way.

The basic issue here is that operator precedence is determined by the parser, which acts before any user definitions are loaded.

Closely related to #16985.

from julia.

JeffBezanson avatar JeffBezanson commented on May 23, 2024

Also related: #18714
I think without more specifics this issue isn't actionable though. If there is a new proposed operator we don't yet parse, it can be added in this way, or if there are existing operators that should be changed (ergo 2.0) they should be listed explicitly.

from julia.

jariji avatar jariji commented on May 23, 2024

One that might even be doable in 1.x is 2 .^ 1:5 which I can't imagine anybody doing on purpose.

As for 2.0, I think perhaps even most operators might be better off with this treatment absent some strong particularized argument for each one (such as the strong and universal convention on +-*/^() etc). Supporting code like w ⩋ x ⩍ y ⩎ z does no favors for readability, at least for me.

from julia.

putianyi889 avatar putianyi889 commented on May 23, 2024

this question might be dumb, but what is preventing treating consecutive operators as a new operator?

from julia.

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.