<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">"I'm not sure, but it might help to make abstractness be gradual."<BR><BR>This is a good principle I can't remember being elucidated before. Not just abstract but a bunch of other principles too... Valueness, constness, a bunch of other stuff. Having extensible annotations is part of this but there will no doubt be more...<BR><BR>I like abstract as an annotation, but that means e.g. Abstract methods or classes still need bodies, if abstract is in a level above the core language <BR><BR>J</DIV></DIV>
<DIV dir=ltr>
<HR>
<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">From: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:lex@lexspoon.org">Lex Spoon</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Sent: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">19/07/2013 14:08</SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">To: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:andrew.p.black@gmail.com">Andrew P Black</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Cc: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:grace-core@cecs.pdx.edu">grace-core@cecs.pdx.edu</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Subject: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Re: [Grace-core] On Gradual Typing</SPAN><BR><BR></DIV>>> The point is that you don't know what inherits from it (statically,<BR>>> probably), and so with a static typechecker it is an error. It isn't<BR>>> necessarily wrong dynamically, and if the typechecker is fully<BR>>> disabled by an out-of-band lever then the program should be fine.<BR>><BR>> I had assumed that the point of a type-checker was to help me find errors,<BR>> not to stop me writing an abstract superclass.<BR><BR>That seems like a killer observation.<BR><BR>I'm not sure, but it might help to make abstractness be gradual. It's<BR>fun to say anyway. :) The idea would be that if a class is marked<BR>neither "abstract" nor "concrete", then the compiler should assume the<BR>class might be abstract and further that it might have abstract<BR>members that the programmer has not specified. In the strict mode of<BR>the compiler, all classes would need to be marked as either abstract<BR>or concrete; gradually concrete would no longer be allowed.<BR><BR>For the larger story Michael has raised about gradual type checking, I<BR>find it easier to think about literals, because literals normally<BR>don't require a type annotation. Here's a simple example:<BR><BR> print(3 + 4 - "not a number")<BR><BR>The story about how gradual typers leave out error messages is that<BR>the programmer leaves out type annotations in parts of the program<BR>that they don't want type checking to happen. In this code, there are<BR>no types to leave out, because even in the strictest type-checking<BR>mode, the code has no type annotations. As such, this code must do the<BR>same thing in gradual mode and strict mode. Presuming the code has an<BR>error in strict mode, that means it must have an error in gradual mode<BR>as well.<BR><BR>That might well be considered fine. Unlike with the possibly abstract<BR>class example, this code really is a definite error.<BR><BR>Lex<BR>_______________________________________________<BR>Grace-core mailing list<BR>Grace-core@cecs.pdx.edu<BR>https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core<BR></BODY></HTML>