<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Polarity in Type Theory</title>
	<atom:link href="http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/feed/" rel="self" type="application/rss+xml" />
	<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/</link>
	<description>Abstract types are existential types.</description>
	<lastBuildDate>Tue, 29 Jan 2013 15:10:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Robert Harper</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1082</link>
		<dc:creator><![CDATA[Robert Harper]]></dc:creator>
		<pubDate>Thu, 30 Aug 2012 12:29:43 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1082</guid>
		<description><![CDATA[Ok, I&#039;ll have a look.  Thanks for the reference.]]></description>
		<content:encoded><![CDATA[<p>Ok, I&#8217;ll have a look.  Thanks for the reference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbaelde</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1081</link>
		<dc:creator><![CDATA[dbaelde]]></dc:creator>
		<pubDate>Thu, 30 Aug 2012 12:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1081</guid>
		<description><![CDATA[Really, least fixed points can be made asynchronous (providing in particular finite lazy lists) and greatest fixed points synchronous, without loosing completeness of focused proofs, and without having partial proofs: see my ACM ToCL paper. Now, there are lots of subtleties in the details here: for example, I avoid saying &quot;negative&quot; but stick to &quot;asynchronous&quot; for a reason. But I don&#039;t think that blog comments are the right place to bring the discussion to the necessary level of technical detail.]]></description>
		<content:encoded><![CDATA[<p>Really, least fixed points can be made asynchronous (providing in particular finite lazy lists) and greatest fixed points synchronous, without loosing completeness of focused proofs, and without having partial proofs: see my ACM ToCL paper. Now, there are lots of subtleties in the details here: for example, I avoid saying &#8220;negative&#8221; but stick to &#8220;asynchronous&#8221; for a reason. But I don&#8217;t think that blog comments are the right place to bring the discussion to the necessary level of technical detail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Harper</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1077</link>
		<dc:creator><![CDATA[Robert Harper]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 19:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1077</guid>
		<description><![CDATA[thanks, i ought to have said that.]]></description>
		<content:encoded><![CDATA[<p>thanks, i ought to have said that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Harper</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1076</link>
		<dc:creator><![CDATA[Robert Harper]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 19:55:56 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1076</guid>
		<description><![CDATA[i haven&#039;t written any significant amount of code in scala, so it&#039;s hard for me to say.  we evaluated it as a possible choice for the introductory curriculum at carnegie mellon (along with haskell, ocaml, standard ml, and f#), and decided against it.  my impression at that time was that it is a rather baroque combination of object nonsense with functional programming dictated by the requirement to compile to the jvm and to accommodate conventional wisdom.  for teaching purposes something more idealistic seemed more appropriate.  f# is a non-starter because they eliminated the very thing we need most from ml, the concept of modules!  it is not possible in f# to write down a signature of, say, a queue and consider several different implementations of that signature simultaneously, nor is it possible to consider that a given module satisfies many different descriptions (views).  whatever f# may be good for, i&#039;m not sure, but it&#039;s definitely not good for teaching programming.  we tried hard to like haskell, but it, too, is impossible to use for teaching, because the time and especially space complexity is impossible to assess analytically, because laziness is absolutely incompatible with parallelism, and because even the most elementary program verification technique, proof by mathematical induction, is inapplicable to any haskell program!  three strikes and you&#039;re out.  this left us with a choice of either ocaml or standard ml, which could really have gone either way, but we have a prior commitment to standard ml, and ocaml&#039;s modules language has some shortcomings that we&#039;d prefer to avoid, so the result was that we decided on standard ml.  contrary to what one might suspect, we were forced into this choice (not unwillingly), rather than imposed it a priori.]]></description>
		<content:encoded><![CDATA[<p>i haven&#8217;t written any significant amount of code in scala, so it&#8217;s hard for me to say.  we evaluated it as a possible choice for the introductory curriculum at carnegie mellon (along with haskell, ocaml, standard ml, and f#), and decided against it.  my impression at that time was that it is a rather baroque combination of object nonsense with functional programming dictated by the requirement to compile to the jvm and to accommodate conventional wisdom.  for teaching purposes something more idealistic seemed more appropriate.  f# is a non-starter because they eliminated the very thing we need most from ml, the concept of modules!  it is not possible in f# to write down a signature of, say, a queue and consider several different implementations of that signature simultaneously, nor is it possible to consider that a given module satisfies many different descriptions (views).  whatever f# may be good for, i&#8217;m not sure, but it&#8217;s definitely not good for teaching programming.  we tried hard to like haskell, but it, too, is impossible to use for teaching, because the time and especially space complexity is impossible to assess analytically, because laziness is absolutely incompatible with parallelism, and because even the most elementary program verification technique, proof by mathematical induction, is inapplicable to any haskell program!  three strikes and you&#8217;re out.  this left us with a choice of either ocaml or standard ml, which could really have gone either way, but we have a prior commitment to standard ml, and ocaml&#8217;s modules language has some shortcomings that we&#8217;d prefer to avoid, so the result was that we decided on standard ml.  contrary to what one might suspect, we were forced into this choice (not unwillingly), rather than imposed it a priori.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Shulman</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1072</link>
		<dc:creator><![CDATA[Mike Shulman]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 17:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1072</guid>
		<description><![CDATA[If you&#039;ll forgive my bringing in a particular fad of the computer industry, I&#039;m curious what you think of the programming language Scala.  It seems to have at least a basic recognition of both negative aspects of types (since it builds on the &quot;object-oriented&quot; style coming out of C++ and Java) and positive ones (there called, I believe, &quot;case classes&quot;).]]></description>
		<content:encoded><![CDATA[<p>If you&#8217;ll forgive my bringing in a particular fad of the computer industry, I&#8217;m curious what you think of the programming language Scala.  It seems to have at least a basic recognition of both negative aspects of types (since it builds on the &#8220;object-oriented&#8221; style coming out of C++ and Java) and positive ones (there called, I believe, &#8220;case classes&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Shulman</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1071</link>
		<dc:creator><![CDATA[Mike Shulman]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 17:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1071</guid>
		<description><![CDATA[One way to see cartesian products as a positive type categorically, which avoids the unsatisfying feeling of having to &quot;put them in&quot; in advance before you can get them out, is to start with a &lt;a href=&quot;http://ncatlab.org/nlab/show/cartesian+multicategory&quot; rel=&quot;nofollow&quot;&gt;cartesian multicategory&lt;/a&gt; instead of an ordinary category.  In some sense this is a more accurate representation of type-theoretic semantics, because in practice (in most programming languages) we define functions which take &quot;multiple arguments&quot; and regard them as different both from functions which take a single tupled argument, and from &quot;curried&quot; functions which take one argument and return another function.

In a cartesian multicategory, the cartesian product has a &quot;mapping out&quot; universal property like you would expect for a positive type: Hom(A x B ; C) = Hom(A,B ; C).  The fact that such an object is equivalent to a categorical cartesian product (with usual its negative &quot;mapping in&quot; universal property) depends on cartesianness of the multicategory, which in turn encodes the structural rules of weakening and contraction in type theory.  Thus the category theory exactly mirrors the type-theoretic fact that in linear type theory, the positive and negative products are different.]]></description>
		<content:encoded><![CDATA[<p>One way to see cartesian products as a positive type categorically, which avoids the unsatisfying feeling of having to &#8220;put them in&#8221; in advance before you can get them out, is to start with a <a href="http://ncatlab.org/nlab/show/cartesian+multicategory" rel="nofollow">cartesian multicategory</a> instead of an ordinary category.  In some sense this is a more accurate representation of type-theoretic semantics, because in practice (in most programming languages) we define functions which take &#8220;multiple arguments&#8221; and regard them as different both from functions which take a single tupled argument, and from &#8220;curried&#8221; functions which take one argument and return another function.</p>
<p>In a cartesian multicategory, the cartesian product has a &#8220;mapping out&#8221; universal property like you would expect for a positive type: Hom(A x B ; C) = Hom(A,B ; C).  The fact that such an object is equivalent to a categorical cartesian product (with usual its negative &#8220;mapping in&#8221; universal property) depends on cartesianness of the multicategory, which in turn encodes the structural rules of weakening and contraction in type theory.  Thus the category theory exactly mirrors the type-theoretic fact that in linear type theory, the positive and negative products are different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neel Krishnaswami</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1069</link>
		<dc:creator><![CDATA[Neel Krishnaswami]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 08:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1069</guid>
		<description><![CDATA[Polarity doesn&#039;t give a complete account of how data types work, because it doesn&#039;t &quot;know about&quot; the effects of data abstraction. The simplest example I know is the following isomorphism in System F: 

P ≃ ∀α. (P → α) → α 

If P is positive, then this asserts the equivalence of a positive and a negative type! This is quite a remarkable fact, the more so since it&#039;s true. :) 

From the categorical point of view, this reflects the insufficiently-appreciated fact that abstract types are neither algebras nor coalgebras. The categorical approach to (co)algebra is inherently functorial, and since APIs frequently and naturally are mixed-variance, you can&#039;t really define functorial actions for them. You &lt;em&gt;really&lt;/em&gt; need parametricity to explain this, and its categorical formulation is nontrivial, to say the least.

None of this is a knock on polarity, of course -- it&#039;s really amazing just how much mileage you can get out of it, and I don&#039;t know anything in PL theory with a better power-to-weight ratio.]]></description>
		<content:encoded><![CDATA[<p>Polarity doesn&#8217;t give a complete account of how data types work, because it doesn&#8217;t &#8220;know about&#8221; the effects of data abstraction. The simplest example I know is the following isomorphism in System F: </p>
<p>P ≃ ∀α. (P → α) → α </p>
<p>If P is positive, then this asserts the equivalence of a positive and a negative type! This is quite a remarkable fact, the more so since it&#8217;s true. :) </p>
<p>From the categorical point of view, this reflects the insufficiently-appreciated fact that abstract types are neither algebras nor coalgebras. The categorical approach to (co)algebra is inherently functorial, and since APIs frequently and naturally are mixed-variance, you can&#8217;t really define functorial actions for them. You <em>really</em> need parametricity to explain this, and its categorical formulation is nontrivial, to say the least.</p>
<p>None of this is a knock on polarity, of course &#8212; it&#8217;s really amazing just how much mileage you can get out of it, and I don&#8217;t know anything in PL theory with a better power-to-weight ratio.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Harper</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1066</link>
		<dc:creator><![CDATA[Robert Harper]]></dc:creator>
		<pubDate>Sun, 26 Aug 2012 21:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1066</guid>
		<description><![CDATA[As soon as you admit partiality, the situation changes.]]></description>
		<content:encoded><![CDATA[<p>As soon as you admit partiality, the situation changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbaelde</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1065</link>
		<dc:creator><![CDATA[dbaelde]]></dc:creator>
		<pubDate>Sun, 26 Aug 2012 19:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1065</guid>
		<description><![CDATA[I agree with most of what Bob wrote, but I&#039;d also say that the association of inductive with positive and coinductive with negative is abusive. Indeed, my work on extending focusing to logics with least and greatest fixed points has revealed that polarities are not fixed for those connectives: one can define complete focused proof systems with either choice of polarities. And Dan&#039;s comment gives a pretty good intuition of why this is the case.]]></description>
		<content:encoded><![CDATA[<p>I agree with most of what Bob wrote, but I&#8217;d also say that the association of inductive with positive and coinductive with negative is abusive. Indeed, my work on extending focusing to logics with least and greatest fixed points has revealed that polarities are not fixed for those connectives: one can define complete focused proof systems with either choice of polarities. And Dan&#8217;s comment gives a pretty good intuition of why this is the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Harper</title>
		<link>http://existentialtype.wordpress.com/2012/08/25/polarity-in-type-theory/#comment-1060</link>
		<dc:creator><![CDATA[Robert Harper]]></dc:creator>
		<pubDate>Sun, 26 Aug 2012 14:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.wordpress.com/?p=665#comment-1060</guid>
		<description><![CDATA[ok, what do you have in mind?]]></description>
		<content:encoded><![CDATA[<p>ok, what do you have in mind?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
