Remove Path class from the Dart SDK #11666
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
Milestone
This issue was originally filed by demis.b...@gmail.com
Introducing an interim Path type to manipulate string paths is an un-necessary friction given the dart:io File and Directory classes only work with strings. It's also a good show-case on how over-typing SDK API's are less re-usable, composable and overall harder to work with.
We should remove the Path type from the SDK given that better and redundant options (also made by the Dart Team) exist including pathos: http://pub.dartlang.org/packages/pathos
Ideally Dart SDK APIs should have a minimal and flexible API surface with special care taken when converting what is commonly else-where a string API behind types which as a side-effect can create friction and reduce interoperability. IOTW there should be a clear and visible benefit to typing string APIs in the SDK. When they exist they should be balanced against the ease-of-use and imposed friction compared with the existing node.js APIs:
http://nodejs.org/api/path.html
It's always an option for external higher-level libs to provide a typed API layer over it, that way their use is isolated to those who prefer and see value in it.
The text was updated successfully, but these errors were encountered: