| ▲ | echelon 4 hours ago |
| I used to like Python in the 2010s when it felt like a breath of fresh air relative to PHP and Perl. Now it feels like a weird PHP itself that is slow, brittle, and dangerous to write code at scale in. The loose typing, potluck standard library, and horrible package manager (insofar as the community does not know how to package code) all feel so dated. |
|
| ▲ | plant-ian 3 hours ago | parent | next [-] |
| I felt the same way about moving to Python versus PHP and Perl. I still really enjoy using python though. It's not really a fair comparison because I hadn't used PHP and Perl for as long but I just don't hit some mystifying issue every single session like I did with those languages when I'm using python. I honestly have never even read about that __debug__ constant. It's fun to hear about it but it's just not something that's comes up much. |
| |
| ▲ | wredcoll 2 hours ago | parent [-] | | Perl is a lot like that also, you can read about some really weird old features like $[ but you never see that in practice, you just write code with variables and functions and so on. |
|
|
| ▲ | datakan 4 hours ago | parent | prev | next [-] |
| It is 30+ years old with all the baggage you would expect. It’s very much a product of its time. |
| |
| ▲ | 9dev 3 hours ago | parent | next [-] | | It’s not like that cannot be changed. Look at PHP, which managed to evolve brilliantly over the last decade and gets tons of things right now. | | |
| ▲ | snitty 3 hours ago | parent | next [-] | | I keep on hearing people be excited about PHP. Having first attempted to use PHP in early 00s, I simply cannot bring myself to attempt it again. I once had to rewrite large chunks of a site because it simply couldn't deal with the fact that a string had an apostrophe in it. | |
| ▲ | thayne 2 hours ago | parent | prev [-] | | PHP has evolved a lot, but it also still has a lot of cruft from its earlier days. And it has made breaking changes on a scale python probably couldn't get away with. |
| |
| ▲ | randallsquared 3 hours ago | parent | prev [-] | | Python 3(000) was an opportunity to fix all the things, so in a sense, the modern Python is less than 20 years old. |
|
|
| ▲ | KK7NIL 3 hours ago | parent | prev | next [-] |
| Python certainly has some baggage, especially the typing system (which is still not finished, if you're looking at static typing and so is implemented differently by type checkers) and pip's safety, or lack thereof. But comparing it to PHP or Perl is rhetoric leading you one step too far. |
| |
| ▲ | fugigigjfn 3 hours ago | parent [-] | | Comparing it with PHP is unfair… to PHP. The amount of hard work that the PHP community has done to advance and keep their language relevant is impressive and admirable, and Python is perhaps the most extreme counterexample there is. The Python community has spent the last 15 years refusing to improve in any meaningful way, or to learn anything from their peers. As someone who used to choose only jobs that would let me work with Python, I’ve gone through every phase of grief, and now just try to forget that it exists. | | |
| ▲ | mixmastamyk 3 hours ago | parent | next [-] | | Lol, Python has had incredible improvements over the last decade plus, while uv fixed packaging. It's the best/comprehensive glue language ever made, even with a few remaining warts. | |
| ▲ | rmunn 2 hours ago | parent | prev [-] | | Most of the time downvoters don't explain their downvote, but I'll explain mine. I voted this comment down because it's just plain incorrect.I worked with PHP for nearly ten years (and I never want to go back). Maybe PHP has improved since I worked with it (PHP 7.4 was the most recent version when I last worked with it, I have never used PHP 8), but I doubt it. But to describe the Python community as "spen[ding] the last 15 years refusing to improve in any meaningful way" is just laughably wrong. I can't give details as I haven't been doing much Python work, but even so I know of multiple changes, such as the typing system, or packaging improvements, which have significantly improved the language AFAICT. If there's a reason why you would not consider those to be "improv[ing] in any meaningful way", please enlighten me. | | |
| ▲ | mixmastamyk an hour ago | parent [-] | | You mentioned two biggies, but also the GIL removal, async, performance improvements, f-string, walrus, fast dicts w. merge ops, data classes, pattern matching, friendlier repl, and hundreds of smaller yearly improvements. |
|
|
|
|
| ▲ | adamddev1 3 hours ago | parent | prev | next [-] |
| I don't understand how people talk about how Python is "easy to learn for beginners" or "easy to understand." To me it's so hard to remember and follow all the weirdness. Racket / Scheme / I dare say even Haskell would just be so much simpler for learners. I'm with Conal Elliot when he said on Type Theory for All that it is sooo much harder to understand a program in Python. |
| |
| ▲ | kalenx 2 hours ago | parent | next [-] | | I can understand that "advanced" python programs may be difficult to understand for beginners (lots of implicit/hidden behaviors, possibility to change basically everything one should expect, etc). But to _learn_ programming, I really, really don't see how using Haskell would be simpler than Python. Perhaps if you have a specific background (e.g., math), but else python is almost pseudo code already. You'll really have to convince me that a more abstract language is better... | | |
| ▲ | fn-mote 2 hours ago | parent | next [-] | | Haskell’s hard to interpret error messages alone disqualify it from being a beginner language. Python: errors based on incorrect indentation (many beginners don’t use nice IDEs), or don’t understand the meaning of the hints) and scope (don’t forget your “global” if you’re hacking in PyGame) are challenges. | |
| ▲ | 2 hours ago | parent | prev [-] | | [deleted] |
| |
| ▲ | quadrifoliate 3 hours ago | parent | prev | next [-] | | > Racket / Scheme / I dare say even Haskell would just be so much simpler for learners. I have used all three languages; and you clearly have no idea of the notion of usability of a language. So many things contradict this, let me list them off the top of my head - Getting a running toolchain working: Prexisting (most OSes bundle a Python interpreter) or a package install away for Python. Scheme / Racket is some odd mix of custom IDEs with Dr. in the name, or someone's 20 page essay on how SLIME is the best thing ever. Haskell gets into odd stuff with ghci, cabal, and stack, and all of them are extremely slow. - Tutorials: Python has a ton of them, they all get you printing to stdout and calculating things in about 10 minutes. Scheme / Racket typically spends multiple chapters navel-gazing about lists, cons, and such. Haskell is actually better in terms of the Hello World stuff, but ghci v/s ghc bites you again; and no one has a clear idea of which one to use. - Advanced concepts: Python has mainstream but halfhearted OOP; and things like decorators and metaprogramming. Quickly intelligible if you learned something else like Java or C++. Or if you learned shell scripts you can get quite a bit done with just imperative. Racket/Scheme: 3 chapters in and you're still trying to figure out tail recursion. Haskell: Instead of just doing fun things with take and foldl you're being hit with trivia about typeclasses. | | |
| ▲ | fn-mote an hour ago | parent [-] | | > Quickly intelligible if you learned something else like Java or C++ You’re replying to a post making assertions about beginners. That doesn’t usually mean people with 4 years programming experience picking up a new language. Racket: criticizing for having a beginner-friendly IDE doesn’t make a lot of sense. There’s always Magic Racket for VSCode for the others. I guess you’re not starting people with “How to Design Programs” because that’s pictures and animations for ages. Haskell: that was funny but an absurd criticism ghc vs ghci?? Nobody has that problem. The other stuff - valid but lead with it instead of trolling. | | |
| ▲ | quadrifoliate 39 minutes ago | parent [-] | | > Haskell: that was funny but an absurd criticism ghc vs ghci?? Nobody has that problem. Back when I was a beginner actually interested in getting out of the beginner step of Haskell, this was an issue for me times. So there's at least one person :) Also anecdotally I have seen people ask this in Freenode #haskell as well (the “Freenode” probably tells you how long ago this was) ; and there a few issues [1] and [2] where I see beginners having the same/similar issue. The second one is particularly funny, 4 people give 5 solutions and no one seems to know what the actual fix is. Instead you have people arguing whether a repeated do works or not. This would never happen with Python, just saying :) > Racket: criticizing for having a beginner-friendly IDE doesn’t make a lot of sense. Sorry, perhaps too harsh but I don't think it's as beginner-friendly as you think. I think it would probably help if they made the design more modern and welcoming. All these details about you can rewrite entire languages in Lisp and we can't even at least get a GUI that looks like it was written after 2007? --------- [1] https://www.reddit.com/r/haskell/comments/1kfym5s/difference... [2] https://www.reddit.com/r/haskell/comments/18yj7i5/i_have_jus... |
|
| |
| ▲ | wredcoll 2 hours ago | parent | prev [-] | | It would help a lot if every single racket/scheme example wasn't entirely made of single character variables. |
|
|
| ▲ | 4 hours ago | parent | prev | next [-] |
| [deleted] |
|
| ▲ | irishcoffee 3 hours ago | parent | prev | next [-] |
| I feel the same way. It was, back then “the second best language for everything, the first best at nothing” Can’t take credit for the quote, read it somewhere. The whole language changed when they kicked what’s-his-name out, and it’s a tool I almost never reach for anymore, whereas 15 years ago it was my Swiss Army knife. |
|
| ▲ | slopinthebag 3 hours ago | parent | prev [-] |
| Who cares tho. The agents deal with all of that, if you’re still looking at the code or caring about anything other than the loops and orbs you’re at the wrong level of abstraction. The important thing is the models have tons of python in their training data. |
| |