{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/27559","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/27559/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/27559/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/27559/events","html_url":"https://github.com/dart-lang/sdk/issues/27559","id":182090852,"number":27559,"title":"Allow `=` as separator for named parameter default value.","user":{"login":"floitschG","id":8631949,"avatar_url":"https://avatars.githubusercontent.com/u/8631949?v=3","gravatar_id":"","url":"https://api.github.com/users/floitschG","html_url":"https://github.com/floitschG","followers_url":"https://api.github.com/users/floitschG/followers","following_url":"https://api.github.com/users/floitschG/following{/other_user}","gists_url":"https://api.github.com/users/floitschG/gists{/gist_id}","starred_url":"https://api.github.com/users/floitschG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floitschG/subscriptions","organizations_url":"https://api.github.com/users/floitschG/orgs","repos_url":"https://api.github.com/users/floitschG/repos","events_url":"https://api.github.com/users/floitschG/events{/privacy}","received_events_url":"https://api.github.com/users/floitschG/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-language","name":"area-language","color":"c7def8"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Resolution:%20fixed","name":"Resolution: fixed","color":"8d8d8d"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dart-lang/sdk/milestones/44","html_url":"https://github.com/dart-lang/sdk/milestones/1.50","labels_url":"https://api.github.com/repos/dart-lang/sdk/milestones/44/labels","id":2047598,"number":44,"title":"1.50","description":"","creator":{"login":"dgrove","id":2108507,"avatar_url":"https://avatars.githubusercontent.com/u/2108507?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrove","html_url":"https://github.com/dgrove","followers_url":"https://api.github.com/users/dgrove/followers","following_url":"https://api.github.com/users/dgrove/following{/other_user}","gists_url":"https://api.github.com/users/dgrove/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrove/subscriptions","organizations_url":"https://api.github.com/users/dgrove/orgs","repos_url":"https://api.github.com/users/dgrove/repos","events_url":"https://api.github.com/users/dgrove/events{/privacy}","received_events_url":"https://api.github.com/users/dgrove/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":6,"state":"open","created_at":"2016-10-04T17:57:55Z","updated_at":"2016-10-20T19:31:57Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-10-10T19:06:25Z","updated_at":"2016-10-21T07:57:28Z","closed_at":"2016-10-20T19:24:17Z","body":"We have `foo([x = 42])` and `foo({x: 42})` as the ways to specify default values for parameters.\r\n\r\nThat means that changing your function from a positional parameter to a named parameter is not just changing the `[]` to `{}`, you also have to change `=` to `:` - but it still means exactly the same thing (default value). This breaks the rule about similar things having similar syntax.\r\n\r\nEven without changing from one type of parameter to another, I still regularly write `=` for named parameters. There is simply nothing to remind me that it's not `=`.\r\n\r\nIt might be cute that it 1) looks like a map or 2) looks like how the function is called, but the former is only true in trivial cases and the latter isn't helping anyway - it's not like positional parameter default values looks like arguments in a function call.\r\n\r\n- [x] language spec (#27634)\r\n- [x] analyzer (#27635)\r\n- [x] intelliJ\r\n- [x] dart2js (#27636)\r\n- [x] vm (#27637)"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/255318407","html_url":"https://github.com/dart-lang/sdk/issues/27559#issuecomment-255318407","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/27559","id":255318407,"user":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars.githubusercontent.com/u/4865287?v=3","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T07:57:28Z","updated_at":"2016-10-21T07:57:28Z","body":"Changelog was https://github.com/dart-lang/sdk/commit/ac76d3eb9f8997c74af0821b5182fa83422bf0ab\r\nAbout letting people know ... probably a good idea :)\r\n"}}
{"actor":{"display_login":"lrhn"}}