{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/229","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/229/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/229/events","html_url":"https://github.com/dotnet/roslyn/issues/229","id":56502073,"number":229,"title":"Implement property initializers for immutable types","user":{"login":"dsaf","id":3845650,"avatar_url":"https://avatars.githubusercontent.com/u/3845650?v=3","gravatar_id":"","url":"https://api.github.com/users/dsaf","html_url":"https://github.com/dsaf","followers_url":"https://api.github.com/users/dsaf/followers","following_url":"https://api.github.com/users/dsaf/following{/other_user}","gists_url":"https://api.github.com/users/dsaf/gists{/gist_id}","starred_url":"https://api.github.com/users/dsaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsaf/subscriptions","organizations_url":"https://api.github.com/users/dsaf/orgs","repos_url":"https://api.github.com/users/dsaf/repos","events_url":"https://api.github.com/users/dsaf/events{/privacy}","received_events_url":"https://api.github.com/users/dsaf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-04T09:34:00Z","updated_at":"2015-02-04T15:53:04Z","closed_at":null,"body":"Immutable types are a best practice nowadays. However, when a C# class has a lot of properties it means ctor will have lots of parameters. Property initializers are easier to read and understand as well.\r\nCan we have a way of initializing properties on immutable types? I have read about C# 6 auto-property initializers and unless I am mistaken they only help with compile-time constants.\r\n\r\nPS: please don't do this by introducing new types (e.g. why have some sort of 'record' when we already have classes and structs?)."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/72879348","html_url":"https://github.com/dotnet/roslyn/issues/229#issuecomment-72879348","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/229","id":72879348,"user":{"login":"SolalPirelli","id":859562,"avatar_url":"https://avatars.githubusercontent.com/u/859562?v=3","gravatar_id":"","url":"https://api.github.com/users/SolalPirelli","html_url":"https://github.com/SolalPirelli","followers_url":"https://api.github.com/users/SolalPirelli/followers","following_url":"https://api.github.com/users/SolalPirelli/following{/other_user}","gists_url":"https://api.github.com/users/SolalPirelli/gists{/gist_id}","starred_url":"https://api.github.com/users/SolalPirelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolalPirelli/subscriptions","organizations_url":"https://api.github.com/users/SolalPirelli/orgs","repos_url":"https://api.github.com/users/SolalPirelli/repos","events_url":"https://api.github.com/users/SolalPirelli/events{/privacy}","received_events_url":"https://api.github.com/users/SolalPirelli/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T15:53:04Z","updated_at":"2015-02-04T15:53:04Z","body":"This can be done with record types (#206) and named arguments.  \r\nFor instance, if you have a `class Point(int X, int Y)`, you could instantiate it with `new Point(X = 0, Y = 42)`."}}