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

Flexible fixed, optional and named argument method signatures #17101

Closed
DartBot opened this issue Feb 25, 2014 · 2 comments
Closed

Flexible fixed, optional and named argument method signatures #17101

DartBot opened this issue Feb 25, 2014 · 2 comments
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Feb 25, 2014

This issue was originally filed by @rbishop-bah


This is a suggestion for consideration for Dart 2.0

I'd like to be able to do something like this:

myMethod(dynamic a, [String b], {num q, num r, num s}, Point p, {String str}, [num z], List aList) {...}

I'd like to be able to combine fixed, optional and optional-named arguments in any combination I think is appropriate for the method I'm writing and have the analyzer/compiler/editor enforce the use of proper signatures.

myMethod("a", "b", r:7, point, str:"hello", 12, []);
myMethod("a", q:7, r:5, point, [11]);
myMethod("a", point, str:"goodbye", null);

all valid. Etc. Many combinations possible.

Issue #7056 is similar.

@sethladd
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Language, Triaged labels.

@gbracha
Copy link
Contributor

gbracha commented Aug 27, 2014

I'll mark this as a duplicate of 7056. Note that you will never be able to mix required and optional positionals in arbitrary order.


Added Duplicate label.
Marked as being merged into #7056.

@DartBot DartBot added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report labels Aug 27, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants