- cross-posted to:
- programmerhumor@lemmy.world
- cross-posted to:
- programmerhumor@lemmy.world
I don’t know who needs to hear this, but Python, like most languages, can be as complex as you make it.
Preach!
Some people in the comments didn’t take it as tongue-in-cheek as I did. 😝
I thought this was really funny. That’s a good collection of toe stubs.
There is a lot of stuff to learn to be good at python but I still love it.
This is so true & unfortunately everyone keeps telling beginners to start at Python
But
and
instead of&&
means beginner friendlyEmbrace your forefather ALGOL: 🤚
and
,&&
👉∧
Are any of those things that you actually deal with as a beginner, though? Sure, those add complexities, but by the time you start to get into them, you are probably no longer a beginner.
Of course… But the idea is that it is misleading… And there’s more traps the beginners falls into. I have a feeling if beginners begin with C++, or other language that is strongly typed and requires memory management and then do some other language that is more abstract like python; they will become better programmers compared to them doing it in reverse.
For someone starting out, I would say that a major advantage of Python over any compiled language is that you can just create a file and start writing/running code. With C++ (which I’m also a heavy user of) you need to get over the hurdle of setting up a build system, which is simple enough when you know it, but can quickly be a high bar for an absolute beginner. That’s before you start looking at things like including/linking other libraries, which in Python is done with a simple
import
, but where you have to set up your build system properly to get things working in C++.Honestly, I’m still kind of confused that the beginner course at my old university still insists on giving out a pre-written makefile and vscode config files for everyone instead of spending the first week just showing people how to actually write and compile hello world using
cmake
. I remember my major hurdle when leaving that course was that I knew how to write basic C++, I just had no idea how to compile and link it when I could no longer use the makefile that we were explicitly told to never touch…Yeah but fuck all that python is good enough for most beginners. Variables, scope, loops, functions, operators… Once you get some of the principles down switching to C++ or similar isn’t nearly as bad.
Being a person that tried to learn C/C# from scratch in my early days python was a good gateway language.
I don’t know, man, far too many people seem to think that “easy to learn” means they’ll know all they need to know in relatively short time.
Like, you talk to our data scientists and they’ll tell you doing anything in Python, no problem. But you talk to our seasoned software engineers and you see the war flashbacks in their eyes, because it racks up in complexity so fucking quickly, it’s insane.
For how popular of a language python is, at this point it’s a bad sign to me that the language has default way to manage versions and create new projects. I get having options, but options are annoying to new folk.
Why would it be a bad sign that the language has built in tools for common things you need to do?
I’m guessing, they meant to write “that the language has no default way”.
Honestly also annoying as a not-so-new folk. I just thought about this yesterday, I reasonably expect to clone a random project from the internet written Java, Rust et al, and to be able to open it in my IDE and look at it.
Meanwhile, a Python project from two years ago that I helped to build, I do not expect to be able to reasonably view in an IDE at all. I remember, we gave up trying to fix all the supposedly missing dependencies at some point…
If the language can just break during runtime because of code indentation, I can’t really trust it
While being controversial, rye is very good for small personal projects. It does pretty much everything from python version management to project scaffolding.
That link is broken…
Coming from c# then typescript and nextjs, rye feels very intuitive and like a nice bridge / gateway drug into python.
I know this may be an unpopular opinion on lemmy, which leans so heavily towards Linux and FOSS, and I’m a Linux user myself but….
I actually really like C# and .NET (the modern cross-platform version anyway).
.net from core 2 was awesome. From 5 onwards it’s been beyond amazing!
The thing that annoys me the most is how it cares about whitespace/carriage returns. I remember back in college when I was taking a CS class, learning Python and writing the Code on a Windows PC, emailing it to myself, and then attempting to run the code on Linux. Before I learned about the carriage return conversions, I remember having to rewrite about 75 lines of code before I got it to run. 🤬
“Print needs ()”
Oh fuck off. years of code that cannot be easily redone in ANY editor. Whoever OCDd that into python 3 needs to have their asshole kicked up into their mouth.
Meanwhile Nim:
echo "I am still worthy"
let a = r"I hate the ugly '\' at the end of " & "multiline statements"
for x in 0..9: if x == 6: echo x echo x # this is error in Nim, but not in python. Insane!
assert false + 1 # this is an error (python devs in shambles) assert true - 1 # see above
Thanks for coming to my Ted-talk.
More here: Nim for Python Programmers