{"id":1867,"date":"2012-10-20T20:00:47","date_gmt":"2012-10-20T19:00:47","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=1867"},"modified":"2012-09-23T09:16:02","modified_gmt":"2012-09-23T08:16:02","slug":"the-bottom-type-in-alfe","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/the-bottom-type-in-alfe\/","title":{"rendered":"The Bottom type in ALFE"},"content":{"rendered":"<p>This is part of the <a href=\"https:\/\/www.reenigne.org\/blog\/the-alfe-type-system\">ALFE types series<\/a>.<\/p>\n<p><strong>Bottom<\/strong> is a special type that has no values associated with it. So declaring a variable or member of type <strong>Bottom<\/strong> is forbidden. It's useful for using as the return type of a function that doesn't ever return normally (i.e. a function that always throws an exception or terminates the process).<\/p>\n<p><strong>[Bottom]<\/strong> is also another name for <strong>Null<\/strong> (or maybe it's a different one-element type, I haven't decided yet).<\/p>\n<p>Another way of writing <strong>Bottom<\/strong> is <strong>Either&lt;&gt;<\/strong> (i.e. an algebraic data type with no types being summed).<\/p>\n<p>I might end up calling it something different - the name has slightly too many connotations of anatomy and (worse) type theory for my taste. I'm not sure what would be better, though. <strong>Empty<\/strong> isn't quite explanatory enough, and <strong>NoReturn<\/strong> doesn't quite capture the full range of <strong>Bottom<\/strong>'s behavior.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of the ALFE types series. Bottom is a special type that has no values associated with it. So declaring a variable or member of type Bottom is forbidden. It's useful for using as the return type of a function that doesn't ever return normally (i.e. a function that always throws an exception [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,27],"tags":[],"class_list":["post-1867","post","type-post","status-publish","format-standard","hentry","category-computer","category-language"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=1867"}],"version-history":[{"count":2,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1867\/revisions"}],"predecessor-version":[{"id":1894,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1867\/revisions\/1894"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=1867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=1867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=1867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}