top | item 34191544

(no title)

alch- | 3 years ago

Off the top of my head, it lacks decent support for functional programming (like multi-line lambdas - pretty basic functionality even for a non-functional-oriented language!), properly supported static typing, proper multithreading, decent performance (in the main implementation)...

discuss

order

dragonwriter|3 years ago

> like multi-line lambdas - pretty basic functionality even for a non-functional-oriented language!

Lambdas with one or more statements instead of a single expression (the actual limitation: “multi-line” is a misnomer) are only an issue because python is a strongly statement-oriented imperative language, and not expression-oriented like most functional and some other languages.

VectorLock|3 years ago

Functions are first-class objects. If you want a multi-line lambda thats just a function.

dragonwriter|3 years ago

> Functions are first-class objects. If you want a multi-line lambda thats just a function.

Yes, lambdas are just anonymous functions that are restricted to a single expression, no statements. This is a problem for programming in functional style, because python idiomatically uses statements a lot, and doing a named definition for a single use function is more verbose and less readable in mant cases.

code_runner|3 years ago

It’s gross to have a function floating off somewhere that has no true reuse value at all and doesn’t live close to where it is used.

I like Python but this is probably my biggest gripe.