[Haskell-cafe] Python?

Pierre Barbier de Reuille pierre.barbier at cirad.fr
Wed May 11 11:39:01 EDT 2005



Jerzy Karczmarczuk a écrit :
> Pierre Barbier de Reuille wrote about Python and lambdas:
> 
>>
>> Well, I would not recommand using lambda functions ! The main reason 
>> is they are limited in that they only accept expressions (ie. not 
>> statements) and you can end up with very ugly things (mainly because 
>> of the lack of if-expressions).
> 
> 
> Oh! You would *like to have imperative statements within LAMBDA*?
> 
> Friend, you are in state of mortal sin!
> 
> I suppose that if somebody decides to use lambdas, he wants to do some
> functional programming, no?
> 
> True, there are no conditional expressions. But there are because of the
> laziness of boolean combinators. This works:
> 
> (x > y) or 'allez en enfer'


That's not my point ! I'm only saying there is no if-expression ... so 
you _need_ statements. And if you really want to use lazy boolean 
operators, you'll end up having very ugly code replacing tests ...

Pierre

> 
> Jerzy Karczmarczuk
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 

-- 
Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68


More information about the Haskell-Cafe mailing list