<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br>Il giorno 25 marzo 2015 11:50, Nicola Larosa <span dir="ltr"><<a href="mailto:nico@teknico.net" target="_blank">nico@teknico.net</a>></span> ha scritto:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">Simone Federici wrote:<br>
> {<br>
> ma quanto mi disturbano le parentesi...<br>
> }<br>
<br>
</span>Eh, ormai ci ho rifatto il callo.<br>
<br>
Pochi programmatori apprezzano il genio dell'indentazione significativa:<br>
sarebbe stato un problema per l'adozione del linguaggio, ancor piĆ¹ dello<br>
svantaggio di non poter avere funzioni anonime inline.<br>
<br>
Non credo che Pike e Thompson si siano proprio posti il problema se<br>
mettercele o meno.<br></blockquote><div><br></div><div>Pare che se lo siano posto il problema. In <a href="https://talks.golang.org/2012/splash.article">questo articolo</a> viene motivata la scelta di evitare l'indentazione per delimitare i blocchi di codice:<br><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Some observers objected to Go's C-like block structure with braces, 
preferring the use of spaces for indentation, in the style of Python or 
Haskell.


    However, we have had extensive experience tracking down build and 
test failures caused by cross-language builds where a Python snippet 
embedded in another language,


    for instance through a SWIG invocation,


    is subtly and <i>invisibly</i> broken by a change in the indentation of the surrounding code.


    Our position is therefore that, although spaces for indentation is nice for small programs, it doesn't scale well,


    and the bigger and more heterogeneous the code base, the more trouble it can cause.


    It is better to forgo convenience for safety and dependability, so Go has brace-bounded blocks.
  </blockquote></div></div><br></div><div class="gmail_extra"><br>Ma non riesco a digerire questo fatto...<br></div></div>