Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Issue 1031323002: Changes for TC52 3rd edition (Closed)

Created:
5 years, 9 months ago by gbracha
Modified:
5 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 79

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+452 lines, -100 lines) Patch
M docs/language/dartLangSpec.tex View 1 2 3 27 chunks +452 lines, -100 lines 1 comment Download

Messages

Total messages: 23 (3 generated)
gbracha
This is my current draft for TC52. It may still be somewhat incoherent. I aim ...
5 years, 9 months ago (2015-03-26 03:23:42 UTC) #2
gbracha
Adding Erik in case he's well again.
5 years, 9 months ago (2015-03-26 03:32:00 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode40 docs/language/dartLangSpec.tex:40: A conforming implementation is permitted to provide additional APIs, ...
5 years, 9 months ago (2015-03-26 10:38:49 UTC) #5
Paul Berry
I've only had a chance to think carefully about the changes related to null-aware operators. ...
5 years, 9 months ago (2015-03-26 15:07:21 UTC) #6
Lasse Reichstein Nielsen
Should we allow null-aware method extraction too? x?#foo
5 years, 9 months ago (2015-03-26 15:16:46 UTC) #7
gbracha
On 2015/03/26 15:16:46, Lasse Reichstein Nielsen wrote: > Should we allow null-aware method extraction too? ...
5 years, 9 months ago (2015-03-26 17:40:22 UTC) #8
Paul Berry
Ok, here's my review of the changes related to generalized tear-offs. https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): ...
5 years, 9 months ago (2015-03-26 18:55:59 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode2353 docs/language/dartLangSpec.tex:2353: \CONST{} type `\#' (`{\escapegrammar .}' identifier)?; Ack, yes, forgot ...
5 years, 9 months ago (2015-03-26 19:18:57 UTC) #10
sra1
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode4102 docs/language/dartLangSpec.tex:4102: Otherwise, let $f$ be the result of looking up ...
5 years, 9 months ago (2015-03-26 19:41:38 UTC) #12
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode4108 docs/language/dartLangSpec.tex:4108: \item If $m$ is a setter name, \code{im.isSetter} evaluates ...
5 years, 9 months ago (2015-03-26 20:23:23 UTC) #13
eernst
lgtm https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode40 docs/language/dartLangSpec.tex:40: A conforming implementation is permitted to provide additional ...
5 years, 9 months ago (2015-03-26 22:38:51 UTC) #14
gbracha
I've responded to most comments. I'll do another read through to ensure basic sanity after ...
5 years, 9 months ago (2015-03-26 23:21:23 UTC) #15
Paul Berry
On 2015/03/26 23:21:23, gbracha wrote: > I've responded to most comments. I'll do another read ...
5 years, 9 months ago (2015-03-26 23:44:11 UTC) #16
gbracha
The deed is done. I've tried to clarify the situation wrt typechecking. Please feel free ...
5 years, 9 months ago (2015-03-27 01:45:11 UTC) #17
gbracha
Committed patchset #4 (id:60001) manually as r44726 (presubmit successful).
5 years, 9 months ago (2015-03-27 01:45:36 UTC) #18
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode4108 docs/language/dartLangSpec.tex:4108: \item If $m$ is a setter name, \code{im.isSetter} evaluates ...
5 years, 9 months ago (2015-03-27 07:03:05 UTC) #19
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode4418 docs/language/dartLangSpec.tex:4418: Evaluation of an assignment $a$ of the form $e_1?.v$ ...
5 years, 9 months ago (2015-03-27 07:14:45 UTC) #20
eernst
Considering the rationale for subexpression evaluation for null-aware operators: Probably the most consistent choice would ...
5 years, 9 months ago (2015-03-27 08:44:03 UTC) #21
Lasse Reichstein Nielsen
https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex#newcode4418 docs/language/dartLangSpec.tex:4418: Evaluation of an assignment $a$ of the form $e_1?.v$ ...
5 years, 9 months ago (2015-03-27 15:42:09 UTC) #22
eernst
5 years, 8 months ago (2015-04-07 10:44:49 UTC) #23
Message was sent while issue was closed.
(Just for the record, publishing a comment which has been sitting here for weeks
because I forgot to "Publish+Mail Comments").

https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec.tex
File docs/language/dartLangSpec.tex (right):

https://codereview.chromium.org/1031323002/diff/1/docs/language/dartLangSpec....
docs/language/dartLangSpec.tex:4418: Evaluation of an assignment $a$ of the form
$e_1?.v$ \code{=} $e_2$ is equivalent to the evaluation of the expression $((x)
=> x == \NULL? \NULL: x.v = e_2)(e_1)$. The static type of $a$ is the static
type of $e_2$.
On 2015/03/27 15:42:09, Lasse Reichstein Nielsen wrote:
> We don't actually have "v ?= e", only "o?.p = e" which should call the setter
p=
> if o is not null (or did you mean "v ??= e"?).
> 
> It is true that there can be different perspectives. Mine is mostly as a "null
> guard", and everything being guarded should be skipped if the guard is null
(or
> for '??', if it is not null). It's a shorthand for something with "x == null ?
> ... : ...".
> 
> The ?? operator exists in C# (and in Groovy as he Elvis operator), and it is
> short-circuit there. It should be short-circuit in Dart too.
> 
> It seems that Groovy's safe navigation operator does evaluate arguments before
> not calling a function, so that's a different behavior. C# is getting safe
> navigation operators (?.foo, ?.coo(), ?[..]), but I can't find their spec.
From
> the examples I've seen I'd expect the ?.foo(args) to not evaluate args. I'll
see
> if I can find an implementation.
> 
> Groovy a.?x=print(42) also prints 42 if a is null.
> At least they are consistent (but the language doesn't seem to have a
> specification that actually specifies anything).

Sorry, I meant "v ??= e".

I think the most intuitive semantics (having had this in the back of my mind
today ;) is based on an "ok, then drop it" rationale: As soon as a null is
encountered, no more actions take place.

Assigning something to a variable _unless_ it is _non-null_ is an anomaly here. 
You might expect that only non-null values could be assigned to a formerly null
valued variable, but you can't undo the side-effects (e.g., print(42)) when you
discover that the returned value is null. So that operation probably doesn't
have a rationale.  ;-)

Powered by Google App Engine
This is Rietveld 408576698