Giter Site home page Giter Site logo

files.dart's People

Contributors

cbracken avatar devoncarew avatar justinfagnani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

files.dart's Issues

unused import dart:async

unused import dart:async as Futures and Streams already implemented in dart:core as per Dart 2.1

Hard to understand which well known principles of programming you use.

abstract class HtmlFileSystemEntry implements FileSystemEntry {
  HtmlFileSystemEntry._(this._fs, this._path);
}

This class is an abstract class.
This class is a public class.
This class with a private constructor.

Public abstract class with a private constructor.

How can be called such programming techniques?

This technique only useful for the static classes.

Eg.

abstract class Platform {
  Platform._internal();

  static final int foo = 0;
}

This class is an abstract class (cannot be instantiated).
This class is a public class (cannot be used anywhere).
This class with a private constructor (cannot be instantiated).

What wrong with this approach?

abstract class HtmlFileSystemEntry implements FileSystemEntry {
}

class _HtmlFileSystemEntry implements HtmlFileSystemEntry {
  _HtmlFileSystemEntry(this._fs, this._path);
}

Of cource, if you really need HtmlFileSystemEntry interface.

P.S.

I know that you (possible) like a Dartish way.
But Dartish way (beloved by ahe) are not a right way for the many serious programmers.

This is because, if your HtmlFileSystemEntry is an interface purpose type then it has a wrong design.

abstract class HtmlFileSystemEntry implements FileSystemEntry {
  final HtmlFileSystem _fs;
  final String _path;

  HtmlFileSystemEntry._(this._fs, this._path);

  String get path => _path;
}

Remeber: I cannot use it as an interface.

// Missing concrete implementation 
// of getter 'HtmlFileSystemEntry._path',
// getter 'HtmlFileSystemEntry._fs'
// getter 'HtmlFileSystemEntry.path'
class MyHtmlFileSystemEntry implements HtmlFileSystemEntry {
}

If I cannot use it as an interface then why it is a

  • Public
  • Abstract
  • Has a private constructor

Where is a logic?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.