{"id":4372,"date":"2014-03-30T10:11:46","date_gmt":"2014-03-30T10:11:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/why-does-int-not-inherit-extend-from-orderedint-collection-of-common-programming-errors\/"},"modified":"2014-03-30T10:11:46","modified_gmt":"2014-03-30T10:11:46","slug":"why-does-int-not-inherit-extend-from-orderedint-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/why-does-int-not-inherit-extend-from-orderedint-collection-of-common-programming-errors\/","title":{"rendered":"Why does Int not inherit\/extend from Ordered[Int]-Collection of common programming errors"},"content":{"rendered":"<p>I have a question on type design. Why does Int not extend the Ordered trait. Isn&#8217;t Int ordered by nature?<\/p>\n<p>Instead, the scala library provides implicit &#8216;orderer&#8217; methods which convert Int to Ordered[Int]. What are the design choices being made here?<\/p>\n<p>Example taken from the book Programming in Scala<\/p>\n<pre><code>def maxListImpParm[T<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have a question on type design. Why does Int not extend the Ordered trait. Isn&#8217;t Int ordered by nature? Instead, the scala library provides implicit &#8216;orderer&#8217; methods which convert Int to Ordered[Int]. What are the design choices being made here? Example taken from the book Programming in Scala def maxListImpParm[T<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4372","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4372"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4372\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}