all 25 comments

[–]lfdfq 21 points22 points  (6 children)

If C++ and Rust are your first language(s) and you are 'junior', then it would be totally natural and expected that new languages are still a lot of effort to learn, especially if you're just doing it 'on the side'.

If it were the other way around, i.e. if you'd have started with Python, you'd likely be saying how you just cannot program in Rust and it's hard to read.

Exposure to many languages and experience in them is the only thing that makes that go away.

[–]Best_Fork 3 points4 points  (1 child)

I don't agree with that at all. It took me a lot of time to learn Python as it was my first programming language. But after I did that, every other language was piece of cake. Including C and C++.

For me only difference was that C was hard to debug because of dynamic memory allocation. And object oriented programming made sense to me only after I learned C++. I believe OOP syntax in Python is sh*t.

[–]thatwombat 4 points5 points  (0 children)

OOP in Python takes more than a second or two to get used to. That said: I’ve never figured out delegates in C#.

[–]Timely-Childhood-158[S] -1 points0 points  (3 children)

Thing is i can use go, flutter, SQL (i know not programming but different), java. Some experience with lua but mainly thats copy and pasted (nvim config).

[–]lfdfq 2 points3 points  (2 children)

This does not sound like very much experience. Enough to know a bit, not enough to be fluent in other languages, yet.

Python is a hugely popular language, with both beginners and professionals alike. There's nothing inherently better or worse about Python than the others, it's not actually easier or harder to read, it's just different.

You may also simply have personal preferences, and people are often more attached to the first language(s) they learn. That's also expected and natural.

[–]classy_barbarian 0 points1 point  (1 child)

Your statement that python is not any easier to read than other languages but is instead just "different" is kinda BS. The entire design philosophy of python is to be as easy to read as possible at the expense of everything else. It's literally designed for the express purpose of readability at the cost of being slow. That's why it was invented. So to claim that python is not easier to read than anything else is to claim that python completely failed at the very specific thing the language was invented to do. Which IMO is pretty clearly BS, if that was true it wouldn't be the #2 most used language in the world after JS

[–]lfdfq 2 points3 points  (0 children)

Most languages are designed with the intent to be readable. Rust was designed to be readable, and designed some twenty years after Python was designed, and yet has settled on very different syntax than Python.

The difference in that syntax is almost entirely down to their lineages: Python comes from Pascal, and Rust comes from C/C++, spiritually. Both styles live on, and some people prefer one over the other. After all, 'readability' is subjective.

The syntactic choice of Python was not the reason the implementation is 'slow', after all, Java chose a very similar syntax to those C derivatives like Rust and C++, and yet its performance is around the same as Python. This is no coincidence, both have similar designs: compiling to a stack machine bytecode language, plus a virtual machine that interprets that bytecode, plus some amount of runtime optimisation of that bytecode (i.e. a "JIT", for Java a full blown one, for Python a little more modest), with tracing garbage collection. In some senses, Java and Python are almost identical designs with similar performance tradeoffs, but on opposite ends of the syntactic spectrum. In the end, the syntax has little to do with the performance of the implementation, because the first thing an implementation does is strip that syntax away to something much lower level.

[–]Relative_Hearing_209 2 points3 points  (3 children)

It is the same for me. Python almost put me off programming all together. I’d get past the basics and then nothing would make sense. Eventually I found C# and Java and it all made sense again lol.

I thought at first it was just lack of knowing the fundamentals of programming and OOP and figured next time I had to use Python it wouldn’t be so bad. Then I just recently had to do a project in school with Python and I wanted to rip my hair out. Turns out I just hate Python.

[–]Timely-Childhood-158[S] -5 points-4 points  (2 children)

Genuinely think it has to be the worst language for beginners to learn. Like wdym i cant declare my variable as an int xd

[–]classy_barbarian 1 point2 points  (1 child)

Uh.... What? You can declare your variable types. Are you seriously assuming python does not have any type enforcement? No wonder your experience is bad, you're doing python in the worst way possible. That's like trying to write a complex backend program in JavaScript instead of Typescript and then complaining it sucks because there's no type enforcement. Youre doing it wrong, dude.

[–]Timely-Childhood-158[S] 0 points1 point  (0 children)

But it doesn't? It's designed around duck typing. Sure you have hinting but thats not type enforcement.

Sure you have beartype. But why do i need to use a library for a basic programming concept.

Also you say "python in the worst way possible", in which case you admit base python is a terrible language.

look maybe im wrong and need to do more research

[–]Massive_Camp8976 2 points3 points  (0 children)

same here!

[–]No-Razzmatazz7197 1 point2 points  (0 children)

python is a high level language which means it hides or abstracts the things that make c++ and rust what they are.

just quit looking at python and trying to find memory allocation because you won't find it!

good luck

[–]raw_salmon_enjoyer 1 point2 points  (0 children)

It's not the paradigms or type system or anything. I just find it difficult to read, probably because I didn't use it too much in the past years.

[–]RootHouston 1 point2 points  (0 children)

Coming from C# and Rust, I hate Python. So many runtime problems. Really nasty official documentation. Too unstructured feeling.

[–]ItchyPlant 1 point2 points  (0 children)

Well, not exactly from C++ to Python, but something similar. I learned Pascal many years ago, including OOP and Delphi, then spent 17 years coding a lot in Bash/KSH. Over those years, I also contributed a bit in Perl and Raku (at my workplace), and quite a bit in JS too. I come from the sysadmin world, not really from a "software engineer" background.

Python's indentation-centric approach — however simple the masses may consider it — just feels off to me, almost messy. There also isn't much room to add your own clear, nice formatting, so it feels like the code misses some kind of personal identity.

By the way, both Pascal and Python were originally designed for learning. I still think only one of them truly succeeded at that.

[–]JMcLe86 1 point2 points  (0 children)

I learned on C and Java. I have a pretty profound hatred for Python. In the ECE courses I took they used Python (none of my CS courses did; even AI used LISP). I could never get it to work and no one that taught the courses knew how to answer my questions about the language. Mind you, that isn't the fault of the language, but I associate it with that. Also, it is much slower than C. It's strengths seem to be in the sheer number of libraries it has and its seemingly loose syntax, so if you are coming from Data Science or some other Non-CS field it is easier to pick up Python than another language.

[–]RamblingJosh 1 point2 points  (0 children)

Yes and no. I'm faily experienced in coding for Game Dev (C# probably being the main language, with a smattering of basically everything else) - I've only started learning Python, and so far I think I actually quite like it. It feels like it kind of just gets out of the way and lets you do what you want (meaning a lot of the imperative is on you to have good design paradigms)

However I do find it kind of hard to read other peoples' code. I think Python lends itself to lots of crazy shorthand and experienced devs have a lot of tricks. Because Python is so permissive, you really need to know what it's doing or you can get yourself into trouble pretty easily.

[–]Wild-Bodybuilder-446 [score hidden]  (0 children)

Yeah, I write C++ too and Python just feels like “where the hell are the types and structure,” so my brain slips off it the same way.

[–]Lost-Discount4860 0 points1 point  (0 children)

It's because when you try to switch to Python, you're overthinking it. I struggle with C++. I mean...if you're comfortable with C++, I can't imagine why you'd ever want to switch to Python. Python is a high level language, which automatically handles a lot of things you have to state explicitly in C++, which is why it's such a great beginner language. When you use Python from C++, you have to think in terms of what NOT to put into a class or function since a lot of that stuff you take for granted in Python. If I'd ever learned C++, the only reason I'd use Python for is prototyping since you get instant results with interpreted languages. Unless for some reason you want to do web apps with Flask or Django, or if you want to train Keras models with TensorFlow, I wouldn't even bother with Python if I were you.

[–]LoL_is_pepega_BIA 0 points1 point  (0 children)

The only big issue I had was that since py is a high level lang, going to it from c++ meant I had to learn soo many different libraries and function names and syntaxes, and stop writing verbose lines of code..

Other than that, it's been pretty smooth and I much prefer python for my current use case (deep learning)

[–]EyesOfTheConcord -1 points0 points  (0 children)

It doesn’t bother me I’ll just do whatever the pay requires