{"action":"closed","issue":{"url":"https://api.github.com/repos/munificent/ui-as-code/issues/20","repository_url":"https://api.github.com/repos/munificent/ui-as-code","labels_url":"https://api.github.com/repos/munificent/ui-as-code/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/munificent/ui-as-code/issues/20/comments","events_url":"https://api.github.com/repos/munificent/ui-as-code/issues/20/events","html_url":"https://github.com/munificent/ui-as-code/issues/20","id":374221119,"node_id":"MDU6SXNzdWUzNzQyMjExMTk=","number":20,"title":"Non-trailing optional parameters","user":{"login":"mdebbar","id":1278212,"node_id":"MDQ6VXNlcjEyNzgyMTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1278212?v=4","gravatar_id":"","url":"https://api.github.com/users/mdebbar","html_url":"https://github.com/mdebbar","followers_url":"https://api.github.com/users/mdebbar/followers","following_url":"https://api.github.com/users/mdebbar/following{/other_user}","gists_url":"https://api.github.com/users/mdebbar/gists{/gist_id}","starred_url":"https://api.github.com/users/mdebbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdebbar/subscriptions","organizations_url":"https://api.github.com/users/mdebbar/orgs","repos_url":"https://api.github.com/users/mdebbar/repos","events_url":"https://api.github.com/users/mdebbar/events{/privacy}","received_events_url":"https://api.github.com/users/mdebbar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-26T04:20:54Z","updated_at":"2018-11-01T23:39:10Z","closed_at":"2018-11-01T23:39:10Z","author_association":"NONE","body":"I was going through the parameter-freedom proposal and wanted to comment on something but I didn't know how, so I'm leaving my comment as a github issue:\r\n\r\nThe reason all languages require optional parameters to appear in the end is because of ambiguities in cases like this:\r\n```dart\r\nvoid foo([int x = 0, int y = 0], int z) {\r\n  // ...\r\n}\r\n\r\nfoo(10, 20);\r\n```\r\nObviously, the 20 goes to `z` in the above example. But what about the 10? If the 10 goes to `x`, then it feels weird that I'm passing two adjacent arguments 10 and 20, but they are going to the 1st and 3rd parameter.\r\n\r\nJust my 2 cents :) And great work by the way, I love this project!\r\n\r\nAlso, there's been some relevant discussions here: https://github.com/dart-lang/language/issues/58 about rest parameters."}}
{"actor":{"display_login":"munificent"}}