Andrei Alexandrescu, el 1 de diciembre a las 11:07 me escribiste: > Walter Bright wrote: > >Leandro Lucarella wrote: > >>with file(fname) as f: > >> x = f.read(10) > >> f.write(x) > > > >Looks like you're right, and it's a recently added new feature. I > >suggest it proves my point - Python had to add complexity to > >support another paradigm. Python's "with" doesn't look any simpler > >than scope guard. > > Actually "with" is an awful abstraction as defined in Java (the new > version), C#, and Python. Scheme also has am unwind-protect > function. I strongly believe all of the above are hopelessly > misguided. Scope guard is the right thing, and I am convinced it > will prevail.
Good arguments! -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Los pobres buscan su destino. Acá está; ¿no lo ven? -- Emilio Vaporeso. Marzo de 1914
