Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change syntax from @inject @Named('foo') to @Inject(name: 'foo') #18

Open
llamadonica opened this issue Aug 25, 2015 · 2 comments
Open

Comments

@llamadonica
Copy link

First of all, this is a totally stylistic change, and a breaking one at that. I just think the latter looks a little terser, especially because the form.

const foo = const Foo();

lends itself very well to optional named parameter. Named parameters are already used in a number of projects, e.g. polymer.

I have a pull request for your consideration.

@adaojunior
Copy link

+1

@ltackmann
Copy link
Owner

This is a great idea, but it clashes a bit with our wish to use the https://github.com/google/inject.dart package to define the inject annotation (using this package would allow users to switch between DI containers without large code refacs).

I have created an issue for this on the inject.dart project list and hope you will vote for it google/inject.dart#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants