Il giorno 25 marzo 2015 11:50, Nicola Larosa <n...@teknico.net> ha scritto:
> Simone Federici wrote: > > { > > ma quanto mi disturbano le parentesi... > > } > > Eh, ormai ci ho rifatto il callo. > > Pochi programmatori apprezzano il genio dell'indentazione significativa: > sarebbe stato un problema per l'adozione del linguaggio, ancor piĆ¹ dello > svantaggio di non poter avere funzioni anonime inline. > > Non credo che Pike e Thompson si siano proprio posti il problema se > mettercele o meno. > Pare che se lo siano posto il problema. In questo articolo <https://talks.golang.org/2012/splash.article> viene motivata la scelta di evitare l'indentazione per delimitare i blocchi di codice: 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 *invisibly* 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. Ma non riesco a digerire questo fatto...
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python