<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 19, 2015 at 10:22 PM, Greg Ewing <span dir="ltr"><<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">Stephen Hansen wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Type hinting is already making function definitions verbose enough as it is. The very idea that we'd have both ":" and "::" in the language and that somehow this isn't ambiguous is completely obscene to me.<br>
</blockquote>
<br></span>
If we were to *really* use :: the way Haskell uses it,<br>
then the type information wouldn't be in the function<br>
header. It would be on a separate line, much like a<br>
decorator:<br>
<br>
  quack :: lambda float, int: AnimalSound<br>
  def quack(volume, num_times):<br>
     ...<span class=""><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>That's still verbose, its simply vertically verbose. We have decorators for adding information in the vertical space. Again the duplication of effect seems crazy to me: </div><div><br></div><div>@foo</div><div>bar :: something, baz: something</div><div>def bar(baz):</div><div>    pass</div><div><br></div><div>This reads like a terrible joke. You have : and :: and there's absolutely nothing intuitive or even suggestive about one verses the other, they're almost identical after all. Then you have decorators and ... whatever you call that line? What's the difference?</div><div><br></div><div>We already have an approved syntax for tagging information to function arguments and to signify return type. We shouldn't have two. </div><div><br></div><div>Almost no one uses function annotations, in eight years almost no one has come up with a good general use-case for them besides type hinting, which they were always meant for. Let's use them. </div><div><br></div><div>I do wish you could annotate assignment statements (say, a: int = 5) as I hate the comment feature fiercely, but we can't all have everything.</div><div><br></div><div>Worst case scenario, someone wants to use the annotations for something else, doesn't get to use mypy or other competing tool on that file. We don't need two syntaxes for this problem space. </div></div></div></div>