<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 November 2015 at 18:50, Robinson, Paul <span dir="ltr"><<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</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">'static' is much worse... in any context other than a function-local</blockquote><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">
variable, it's just a completely arbitrary we-already-had-this-reserved<br>
keyword. Put it on a file-level variable, and it determines... visibility!<br>
Put it on a class method, and... something with no one-word description<br>
happens!  There really is no possible English definition of 'static' that<br>
could apply to either of those cases.<br></blockquote><div><br></div><div>Well, if I squint a bit I can see a connection between its use in functions and in classes, but its effect in file-scope is really unrelated indeed. The biggest irony that their its use inside functions/classes makes the declaration behave (except for the scoping of its name) as if it were a declaration at file scope, but *not* a static one there!</div><div><br></div><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">
'auto' applied to a return-type could at least be interpreted as<br>
"automatically decide what this type is"</blockquote><div><br></div><div>Except support for return-type inference is more recent than support for using 'auto' to introduce the trailing return type syntax. There's technically actually therefore now ambiguity between those two uses of the keyword, disambiguated by the presence or absence of an actual trailing return type.</div><div><br></div><div>You can of course also combine them, i.e.</div><div><font face="monospace, monospace"><font color="#bf9000">let</font> foo( ... ) -> </font><span style="color:rgb(106,168,79);font-family:monospace,monospace;font-size:12.8px">auto</span><font face="monospace, monospace"> { ... }</font></div><div><br></div><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">Although I have to say, 'let' has some appeal.</blockquote><div><br></div><div>I think it's really remarkable how well it fits and natural it feels, far more so than 'auto' (at least to me; I may be biased due to exposure to languages like OCaml).</div><div><br></div><div>Matthijs</div></div></div></div>