2015-07-28 16:04 GMT+02:00 enrico franchi <enrico.fran...@gmail.com>:
> 2015-07-28 13:39 GMT+01:00 Carlo Miron <mi...@python.it>: >> > Ehm... *se* fosse Python valido, quell'if valuterebbe sempre a vero (a = >> > 3, >> > varrebbe 3) e stamperebbe 3. >> >> e chi te lo dice? conosco almeno un (meraviglioso™) linguaggio in cui >> il valore restituito sarebbe il-valore-precedente-di-a. > > Diciamo che lo riterrei parecchio probabile... a che linguaggio ti riferisci > per inciso? Ovviamente a Pony, che domande. <http://www.ponylang.org/> >> cosa intendi, scusa? </gnurant> > > Allora, se vuoi modellare una computazione fal punto di vista formale, hai > bisogno che ogni "operazione" abbia un tipo. > O per lo meno lo fai se stai facendo type-theory. Pony ha la clausola `else` appiccicabile a tutte le strutture di controllo¹, per gestire questo caso (in alternativa, restituisce implicitamente `None`). ¹ <http://tutorial.ponylang.org/expressions/control-structures/> © -- |:**THE BEER-WARE LICENSE** (Revision 42): | <mi...@python.it> wrote this mail. As long as you retain | this notice you can do whatever you want with this stuff. | If we meet some day, and you think this stuff is worth it, | you can buy me a beer in return. | --Carlo Miron : _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python