dart-lang / dart-lang/language

Specification: need to elaborate postfix expression definition

Open
#3,771 3 comments 0 reactions 0 assignees View on GitHub
specification technical-debt
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

Dart Language specification, 4-th Edition (December, 2015) "16.31 Postfix Expressions":

> A postfix expression is either a primary expression, a function, method or getter invocation, or an invocation of a postfix operator on an expression e.
> ...
> Execution of a postfix expression of the form C.v ++ is equivalent to executing
> ()fvar r = C.v; C.v = r + 1; return rg().
> The static type of such an expression is the static type of C.v.
> Execution of a postfix expression of the form e1.v++ is equivalent to executing
> (x)fvar r = x.v; x.v = r + 1; return rg(e1).
> The static type of such an expression is the static type of e1.v.
> No any mention about the difference between C and e1. Clarification should be added that C is a type literal and e1 is an expression.

The same is true for C.v-- and e1.v-- defined in the same chapter of the spec

Contributor guide

Open the contributing guide

Research direction

Start with Dart Language Specification, 4th Edition, section 16.31, “Postfix Expressions,” and review the definitions and execution rules for C.v++ and e1.v++. Clarify that C is a type literal while e1 is an expression, and apply the same distinction to C.v-- and e1.v--; done means the specification explicitly explains both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.