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

Issue 12609004: Change all File APIs to make the mode and encoding arguments named (Closed)

Created:
7 years, 9 months ago by Søren Gjesse
Modified:
7 years, 7 months ago
CC:
reviews_dartlang.org, bakster
Visibility:
Public.

Description

Change all File APIs to make the mode and encoding arguments named R=ager@google.com, ajohnsen@google.com, whesse@google.com, floitsch@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=20153

Patch Set 1 #

Total comments: 1

Patch Set 2 : Addressed review comments and changed other use places #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -115 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/source_file_provider.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/tracer.dart View 1 2 chunks +4 lines, -3 lines 0 comments Download
M sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/io/file.dart View 1 8 chunks +10 lines, -10 lines 0 comments Download
M sdk/lib/io/file_impl.dart View 1 12 chunks +15 lines, -15 lines 0 comments Download
M tests/standalone/io/file_error_test.dart View 8 chunks +9 lines, -9 lines 0 comments Download
M tests/standalone/io/file_fuzz_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
tests/standalone/io/file_input_stream_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/file_invalid_arguments_test.dart View 1 5 chunks +16 lines, -23 lines 0 comments Download
M tests/standalone/io/file_test.dart View 22 chunks +34 lines, -34 lines 0 comments Download
M tests/standalone/io/file_write_as_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/skipping_dart2js_compilations_test.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M utils/lib/file_system_vm.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M utils/pub/io.dart View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Søren Gjesse
As we already have some functions where mode and encoding arguments are named I think ...
7 years, 9 months ago (2013-03-13 15:45:04 UTC) #1
floitsch
We should definitely be consistent. LGTM. I wonder if we need the FileMode class, if ...
7 years, 9 months ago (2013-03-13 15:50:55 UTC) #2
Mads Ager (google)
LGTM We started out doing this when there were two or more arguments but I ...
7 years, 9 months ago (2013-03-13 16:08:45 UTC) #3
Bill Hesse
LGTM.
7 years, 9 months ago (2013-03-15 09:00:02 UTC) #4
Søren Gjesse
Committed patchset #2 manually as r20153 (presubmit successful).
7 years, 9 months ago (2013-03-18 12:10:48 UTC) #5
Ivan Posva
7 years, 9 months ago (2013-03-20 15:43:13 UTC) #6
Message was sent while issue was closed.
The fact that you feel that you have to name the only parameter to a function
tells me that something is wrong with this general direction. In particular it
leads to code like this:

s = file.readAsString(encoding: Encoding.ASCII);

How many time do you have to repeat "encoding" on the single line?

You need to reevaluate whether this change is really needed.

Thanks,
-Ivan

Powered by Google App Engine
This is Rietveld 408576698