abstract class IUser{String name;factory IUser () => new User();void Register ();}class User{//Implement later}
Like you point out, I find C# style interface names to be ugly and noisy. The best thing, IMO, is to just define the class, and let it also be used as the interface. If the implementation needs methods you don't want in the interface, then split it the implementation as FooImpl or _FooImpl. That's the style the cite libraries use.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
class UserServices{Future<User> Login (String username, String password) => throw new UnimplementedError();Future<User> New () => throw new UnimplementedError();Future<User> Get (String id) => throw new UnimplementedError();}
ᐧ
Note: UserServices is like that because in TDD you have create the tests before writing actual code, not because its a good way of creating interfaces
--