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

Issue 10938010: Switch from interfaces to abstract classes in dart:io. (Closed)

Created:
8 years, 3 months ago by Mads Ager (google)
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Switch from interfaces to abstract classes in dart:io. Add a bunch of default argument values to the abstract classes so they are picked up by dartdoc. R=sgjesse@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=12484

Patch Set 1 #

Total comments: 32

Patch Set 2 : Address review comments. Add test binaries. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -157 lines) Patch
M pkg/dartdoc/lib/dartdoc.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/chunked_stream.dart View 1 chunk +2 lines, -5 lines 0 comments Download
M runtime/bin/directory.dart View 3 chunks +6 lines, -6 lines 0 comments Download
M runtime/bin/file.dart View 1 7 chunks +21 lines, -27 lines 0 comments Download
M runtime/bin/http.dart View 1 16 chunks +32 lines, -25 lines 0 comments Download
M runtime/bin/http_impl.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/bin/input_stream.dart View 1 4 chunks +13 lines, -9 lines 0 comments Download
M runtime/bin/list_stream.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/bin/output_stream.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/path.dart View 2 chunks +4 lines, -5 lines 0 comments Download
M runtime/bin/path_impl.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/process.dart View 1 3 chunks +9 lines, -9 lines 0 comments Download
M runtime/bin/socket.dart View 3 chunks +7 lines, -5 lines 0 comments Download
M runtime/bin/socket_stream.dart View 1 chunk +4 lines, -5 lines 0 comments Download
M runtime/bin/string_stream.dart View 1 3 chunks +3 lines, -5 lines 0 comments Download
M runtime/bin/websocket.dart View 8 chunks +16 lines, -15 lines 0 comments Download
M tests/co19/test_config.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_headers_test.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tools/test.dart View 1 chunk +21 lines, -21 lines 0 comments Download
M tools/test-runtime.dart View 1 chunk +8 lines, -8 lines 0 comments Download
M tools/testing/bin/linux/dart View 0 chunks +-1 lines, --1 lines 0 comments Download
M tools/testing/bin/macos/dart View 0 chunks +-1 lines, --1 lines 0 comments Download
M tools/testing/bin/windows/dart.exe View 0 chunks +-1 lines, --1 lines 0 comments Download
M utils/apidoc/apidoc.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/apidoc/html_diff.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Mads Ager (google)
8 years, 3 months ago (2012-09-18 09:12:35 UTC) #1
Søren Gjesse
LGTM Looks better - especially having the default values for optional arguments documented using code ...
8 years, 3 months ago (2012-09-18 09:34:16 UTC) #2
Mads Ager (google)
https://codereview.chromium.org/10938010/diff/1/runtime/bin/file.dart File runtime/bin/file.dart (right): https://codereview.chromium.org/10938010/diff/1/runtime/bin/file.dart#newcode129 runtime/bin/file.dart:129: * The default value for [mode] is [:FileMode.READ:]. On ...
8 years, 3 months ago (2012-09-18 10:46:39 UTC) #3
William Hesse
I think it might be better to merge Path and _Path, rather than changing to ...
8 years, 3 months ago (2012-09-21 11:47:39 UTC) #4
Mads Ager (google)
On 2012/09/21 11:47:39, William Hesse wrote: > I think it might be better to merge ...
8 years, 3 months ago (2012-09-21 11:52:02 UTC) #5
William Hesse
I guess the only big disadvantage is that Paths can't be included in a bigger ...
8 years, 3 months ago (2012-09-21 12:19:48 UTC) #6
William Hesse
8 years, 3 months ago (2012-09-21 12:22:15 UTC) #7
Also, individual paths constructed inline in functions and loops are now a new
object each time the constructor is hit, rather than reusing the same const
object.  That is a big use case for const lists - we often want const [], rather
than just [].


On 2012/09/21 12:19:48, William Hesse wrote:
> I guess the only big disadvantage is that Paths can't be included in a bigger
> constant structure now.  I guess it is not likely to be much less efficient to
> have lazy final static Paths than to have const Paths.  Having a const
> constructor is also a good signal that the class is immutable.
> 
> 
> 
> On 2012/09/21 11:52:02, Mads Ager wrote:
> > On 2012/09/21 11:47:39, William Hesse wrote:
> > > I think it might be better to merge Path and _Path, rather than changing
to
> > > factory constructors and losing the const constructor.  Not being able to
> have
> > > const paths seems like a big loss to me (though not as big, now that we
> allow
> > > non-const initializers for statics).  I don't think there is a big reason
to
> > > separate Path and _Path.
> > 
> > Could you explain to me why you think it is important to have const Paths? I
> > can't actually think of a situation where it would matter not that statics
are
> > lazily initialized? You can't use equality on paths even if they are const
> > because two const paths might refer to the same place in the file system. I
> > might be missing something, but I don't really see why const Paths are
useful
> at
> > this point.

Powered by Google App Engine
This is Rietveld 408576698