Comments (6)
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.
I wholeheartedly support moving away from "lvalue" in error messages
from chapel.
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.
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.
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.
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)
- chpldoc: way to share documentation between symbols? HOT 3
- Cannot use domain or domain(?) as a generic return type
- Cannot declare a variable with type domain(?)
- Cannot split-init a variable with declared domain type
- Check how we are getting `-L` and `-l` flags from GASNet HOT 3
- Should casting array-of-T to T require a T-to-T cast? HOT 3
- Should we have a standalone `close()` method for files? HOT 3
- Range.isEmpty() is incorrect in some cases
- Casting associative domains to `string` relies on IO
- Stabilizing serialization for ranges, domains, and iterators in non-default formats HOT 3
- GASNet segmentation fault when throwing from inside an `on` clause inside a method.
- sync does not respect `const`ness
- Chapel+qthreads cannot build on Alpine linux
- Handling of intents for tuples?
- 'require "x.chpl"' is not param-folded HOT 12
- Internal compiler error when using the `in` intent with exported procedures HOT 8
- `var vs = myMap.values()` is permitted on non-nilable values
- Compile error when composing linear algebra functions HOT 3
- Unstable warning about identifiers starting with `_` shouldn't apply to `_` itself HOT 12
- feature request: param arrays, records, tuples, ... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chapel.