5 ms·
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
by adamddev1 22d ago
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.
- quadrifoliate 22d ago> 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 22d ago> 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 22d ago> 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/differences_in_ghci_and_ghc/ https://www.reddit.com/r/haskell/comments/1kfym5s/difference... [2] https://www.reddit.com/r/haskell/comments/18yj7i5/i_have_just_started_learning_haskell_and_i_am/ https://www.reddit.com/r/haskell/comments/18yj7i5/i_have_jus...
- kalenx 22d agoI 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...
- deleted 22d ago[deleted]
- fn-mote 22d agoHaskell’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.
- zahlman 21d ago> many beginners don’t use nice IDEs Starting with 3.13, even the REPL is a sufficiently nice IDE to avoid any careless indentation errors from poor formatting (as opposed to ones caused by actually not understanding how many levels of indentation the current line of code should have).
- wredcoll 22d agoIt would help a lot if every single racket/scheme example wasn't entirely made of single character variables.
- soegaard 21d agoThere is a reason for that. Consider appending two strings in Scheme: (string-append s1 s2) Appending two strings in Scheme: (vector-append v1 v2) Since the type is present in the function name, it would be redundant to include it in the variable name.
- wredcoll 21d agoThis is literally my point. A python example would be like, calling readline to store someone's name into a name variable then printing a string that said "Hello name". Scheme examples are some abstract list manipulations.