
{"id":2347,"date":"2017-03-03T00:16:45","date_gmt":"2017-03-03T05:16:45","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=2347"},"modified":"2017-03-03T00:17:21","modified_gmt":"2017-03-03T05:17:21","slug":"c-null-propagation","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=2347","title":{"rendered":"C# Null Propagation"},"content":{"rendered":"<p>It makes things so simple, I really wish other languages had it. Today in five or six places I wrote something like<\/p>\n<p><strong>_innerObject?.Dispose();<\/strong><\/p>\n<p>instead of<\/p>\n<p><strong>if (_innerObject != null) _innerObject.Dispose();<\/strong><\/p>\n<p>Long live DRY principle! Of course, our friend Juan Gandhi will probably say it is a Maybe monad (hey, how come in this day and age Chrome spell checker does not know the word &#8220;monad&#8221;?!). Anyhow, I wish this kind of shortcut were present in JavaScript. I really miss it. <a href=\"http:\/\/stackoverflow.com\/questions\/32139078\/null-safe-property-access-and-conditional-assignment-in-es6-2015\">The proposal<\/a>\u00a0is already there, but I am not sure how long it will take it to get to the standard, if at all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It makes things so simple, I really wish other languages had it. Today in five or six places I wrote something like _innerObject?.Dispose(); instead of if (_innerObject != null) _innerObject.Dispose(); <a href=\"https:\/\/ikriv.com\/blog\/?p=2347\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[3,4,15],"tags":[],"class_list":["entry","author-ikriv","post-2347","post","type-post","status-publish","format-standard","category-dotnet","category-hack","category-webdev"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2347"}],"version-history":[{"count":3,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2347\/revisions"}],"predecessor-version":[{"id":2350,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2347\/revisions\/2350"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}