3 ms·
Python is deeply incompatible with this style. No do-notation, crippled lambdas, slow function calls. If you want to write Rust/OCaml maybe use Rust or OCaml?
by pharmakom 3y ago
Python is deeply incompatible with this style. No do-notation, crippled lambdas, slow function calls. If you want to write Rust/OCaml maybe use Rust or OCaml?
- intelVISA 3y agoHow am I going to PIP all those CVEs with dune/cargo?!
- baq 3y agoCurrent Python is. Languages evolve. Nothing wrong in importing good ideas from other languages, bonus points if long standing warts get fixed at the same time.
- Kwpolska 3y agoI don't think Python is ever going to get multi-line/fully-featured/less-ugly lambdas.
- dragonwriter 3y agoVery many languages only have single-expression lambdas, Python isn’t unusual in that, its just that nontrivial single expressions in Python are extremely ugly (to the point where most people think they are much more limited than they are.) The lambda issue in Python isn’t really about lambdas, but the readability and expressiveness of expressions.
- pharmakom 3y agoPython would be so much better if it was expression orientated. I don’t think it would even detract from Pythons design goals at all.
- dragonwriter 3y agoI agree, but given the Zen and the disruption when print moved to a function from a statement, I don’t see a good evolution path to get much closer. OTOH, small improvements in what can cleanly be expressed in an expression could still have big payoffs for Python.
- erik_seaberg 3y agoImporting from __future__ worked well to make language changes opt-in. It was a mistake to start breaking backward compatibility by default.
- Kwpolska 3y ago> Very many languages only have single-expression lambdas Which languages are those? Java, C#, C++, Rust, JS, Swift, Kotlin, Scala, Ruby, PHP, and Go all allow defining multi-line anonymous functions that can contain any statement normally allowed in a function.
- datadeft 3y agoIt was not designed to those things and there are many other languages that are way better in many aspects of software engineering than Python ever will be with type checks and other relatively minor improvements. I consider Python as the lingua francua that gets the job done, easy to train new programmers to use it and there are several C/C++/Fortran/Rust libraries written so it can do things performant enough to be relevant. There was nothing new introduced by Python that other languages took from it which shows that there is nothing groundbreaking about it. I think Python is the quick and dirty, not too smart glue languages with a mediocre module system and many footguns. I think Sussman pointed out that the world needs more library gluers than it needs very smart software engineer who create those libraries. Python is the proof of this theory.
- pphysch 3y ago> There was nothing new introduced by Python that other languages took from it which shows that there is nothing groundbreaking about it. Not strictly true, Python's approach to readability (syntax) inspired languages like Kotlin, GDScript, to name a couple. But the bigger picture is that Python has spawned prominent frameworks/DSLs in virtually every domain, so to suggest that it is a dead-end of innovation is not quite correct.