Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3602)

Issue 6909060: code review 6909060: spec: calling delete on a nil map is a no-op (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by gri
Modified:
11 years, 3 months ago
Reviewers:
CC:
rsc, r, iant, ken2, bradfitz, rog, golang-dev
Visibility:
Public.

Description

spec: calling delete on a nil map is a no-op This is language change. It is a backward-compatible change but for code that relies on a run-time panic when calling delete on a nil map (unlikely). Fixes issue 4253.

Patch Set 1 #

Patch Set 2 : diff -r 67026ef0e79e https://code.google.com/p/go #

Patch Set 3 : diff -r 3af6f955dc02 https://code.google.com/p/go #

Patch Set 4 : diff -r 61e3278abfff https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M doc/go_spec.html View 1 2 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 9
gri
Hello rsc, r, iant, ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
11 years, 3 months ago (2012-12-10 18:23:32 UTC) #1
rsc
LGTM but wait for others Background: the spec used to be self-conflicting. It said this ...
11 years, 3 months ago (2012-12-10 18:42:36 UTC) #2
bradfitz
I would prefer deletes on a nil map explode on me... I would assume that's ...
11 years, 3 months ago (2012-12-10 18:59:09 UTC) #3
gri
The current behavior seems less consistent to me then the proposed one (delete on nil ...
11 years, 3 months ago (2012-12-10 19:35:46 UTC) #4
rsc
On Mon, Dec 10, 2012 at 1:59 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > I would ...
11 years, 3 months ago (2012-12-10 19:36:37 UTC) #5
rog
On 10 December 2012 19:36, Russ Cox <rsc@golang.org> wrote: > On Mon, Dec 10, 2012 ...
11 years, 3 months ago (2012-12-11 12:12:02 UTC) #6
gri
PTAL Any others? - gri On Mon, Dec 10, 2012 at 10:42 AM, Russ Cox ...
11 years, 3 months ago (2012-12-12 19:13:08 UTC) #7
iant
LGTM (Actually I don't really care.)
11 years, 3 months ago (2012-12-12 21:04:57 UTC) #8
gri
11 years, 3 months ago (2012-12-12 21:08:40 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=d09a8b21b517 ***

spec: calling delete on a nil map is a no-op

This is language change. It is a backward-compatible
change but for code that relies on a run-time panic
when calling delete on a nil map (unlikely).

Fixes issue 4253.

R=rsc, r, iant, ken, bradfitz, rogpeppe
CC=golang-dev
https://codereview.appspot.com/6909060
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b