GithubHelp home page GithubHelp logo

Comments (6)

mppf avatar mppf commented on May 18, 2024 2

PR #15800 improves this situation by complaining about "const values" in many cases. However for a case like future variables/constants/assignValueExprError.chpl :

proc returnsIntByValue() { return 1; }  
returnsIntByValue() = 1;

the compiler will still report an lvalue error. It currently reports

assignValueExprError.chpl:2: error: illegal lvalue in assignment

@bradcray suggested that it could report

assignValueExprError.chpl:2: error: cannot assign to const expression

Arguably, we could use const expression in all of the error messages (instead of sometimes reporting const value as the compiler will do after PR #15800).

from chapel.

lydia-duncan avatar lydia-duncan commented on May 18, 2024 1

I wholeheartedly support moving away from "lvalue" in error messages

from chapel.

bradcray avatar bradcray commented on May 18, 2024

I threw the "easy" tag on here because I think it is (modulo agreeing on what the new error messages should say... but lots of things would be better than what we have today).

from chapel.

dmk42 avatar dmk42 commented on May 18, 2024

I agree with the concept for general users, though seeing the term lvalue in an error message saved me some work the other day, since it pinpointed exactly what was wrong. It will be difficult to come up with another term that works as well for that purpose.

from chapel.

ben-albrecht avatar ben-albrecht commented on May 18, 2024

I don't think this should have an [easy] label until we agree upon a replacement, which doesn't seem to be happening anytime soon.

from chapel.

bradcray avatar bradcray commented on May 18, 2024

I think the person who owns this issue will need to sort through the error messages and propose alternatives based on the context (e.g., things like 'const', 'param', or 'read-only' may be appropriate depending on the context). I still assert that this is an easy task (including the proposal) but I'm trying to restrain myself from getting caught up into a label wrestling war.

from chapel.

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.