×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
24

Python is horseshit and Guido van Rossum is a nigger-loving nigger.

submitted by SithEmpire to programming 3.4 yearsNov 24, 2021 15:40:17 ago (+25/-1)     (programming)

All of my contact with Python is to fix broken stuff, where most of the time the fix is to start over with a better platform. Every time I end up having to use it, I find new failures in its design which are even more mentally retarded than the time before.

Reliance on white space is colossally retarded and it imposes the need for a `pass` keyword. Anyone who thinks it is possible to force programmers into writing legible code that way is a colossal retard.

Like most pretentious garbage it changes many classic reserved words, just enough that the number of complainers does not rise above half the users. `throw` is `raise`, `catch` is `except`, `null` is `None`, `true` is `True`, `false` is `False`. So much for keeping to a lowercase style when you can use capitals just because those are constants rather than keywords.

Inconsistently, it retains `==`, `!=` and `^` but changes `&&` to `and`, `||` to `or` and `!` to `not`.

Despite being popular for data processing, it cannot thread. It has something called threads, but this is only useful for I/O, because its "global interpreter lock" fundamentally can only run one line at any time. The autistically screeched response is to run extra processes, but its attempt at shared memory is also total ass. All the data popularity comes from being a front end to NumPy, which is written in C.

Lambdas? Only if the result can be written in one expression, no statements allowed.

Class constructor? Some nigger decided to name that `__init__`.

Anonymous object? It was supposed to work but doesn't, but you can `import types` and use `types.SimpleNamespace` instead, that works. Unless you want methods with statements in, then you need to use `def` and pass in all scope variables.

No pre-increment or post-increment. `+=` works, but you can't use it within a comparison test, because fuck you.

No `switch`, get used to `elif` nigger.

No do-while, make a flag or copy the fucking loop code.

No labels for `continue` and `break`, no numeric argument option, not even a fall-back `goto`. Guido himself said that this type of code is too complicated, by which he means he is too retarded to understand it, so fuck off and make a load of complicated flags and tests instead.

It doesn't even have the `===` operator like other languages with dynamic types, you have to test the types yourself... using `__class__` like a nigger.

No `static` keyword, but you can make a static method if you put `@staticmethod` on the line before. Genius.

You can have the ternary operator, but you have to put the test condition in the middle instead of at the front. Also `if` and `else` are reused for doing that, just in case you missed having a horizontal scroll bar.

That much is only what I have learned while otherwise trying to avoid Python.

Fuck


49 comments block


[ - ] Broc_Liath 1 point 3.4 yearsNov 25, 2021 14:15:32 ago (+1/-0)

I don't do enough python to know how annoying those are, but they do look annoying. Like they just force you to write a lot of extra code for no reason. The whitespace formatting thing is fucking annoying though. Way too easy to break.

[ - ] albatrosv15 0 points 3.4 yearsNov 25, 2021 03:33:03 ago (+0/-0)

Nobody has mentioned gdscript whew

[ - ] ForgottenMemes 1 point 3.4 yearsNov 25, 2021 01:34:00 ago (+1/-0)

All of my contact with Python is to fix broken stuff
This has been my experience too, however I chalk it up to the fact that retards who want to signal that they are programmers are literally the only people who use this language.

[ - ] account deleted by user 0 points 3.1 yearsMar 27, 2022 23:28:47 ago (+0/-0)

account deleted by user

[ - ] o0shad0o 2 points 3.4 yearsNov 24, 2021 21:21:10 ago (+2/-0)

I'm quite fond of Python, despite agreeing with you on a number of your criticisms. I mostly disagree with you on the indentation syntax, because of how it forces readability. And every language has its quirks.

The lack of true threading is also something I've run into and had problems with - to the point where I've taken code that ran different processes on different "threads" and unrolled it, sticking it all onto a common queue instead - which of course entirely fails to leverage multiple CPU cores, but at least solved some really nasty bugs.

Even so, this is an interpreted language and if you're using it to handle large projects directly you're doing it wrong.

[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:14:21 ago (+0/-0)

the indentation syntax is the worst idea ever. lots of ways to force readability without relying on your fucking editor to maintain consistency. it doesn't even give you respectable error messages when your indentation is off. worst fucking idea ever.

[ - ] o0shad0o 0 points 3.4 yearsNov 25, 2021 08:45:39 ago (+0/-0)*

Considering that you rely on your editor to find mismatched braces, and those can also give you weird error results, I don't think that's a valid complaint.

I do wish they had a way of overriding the indentation though, setting it back to zero for a block, to accommodate when there's a ton of nesting or when some lines are exceptionally long.

Edit: I'm betting you have your indent set low, like 2-3 spaces, to handle serious nesting better; with more spaces it's much easier to see if the indentation is off. I typically use 4.

[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:30:46 ago (+0/-0)

account deleted by user

[ - ] deleted 1 point 3.4 yearsNov 24, 2021 21:13:24 ago (+1/-0)

deleted

[ - ] o0shad0o 0 points 3.4 yearsNov 24, 2021 21:23:10 ago (+0/-0)

I need to study C#, I've heard many good things about it. Tried C++ and hated it with a passion. I'm afraid I'll dislike .NET similarly, though.

[ - ] Broc_Liath 0 points 3.4 yearsNov 25, 2021 14:20:24 ago (+0/-0)

C++ used to be good, then they kept adding more and more stuff to it until you can hardly tell what it's doing half the time.

C# is a lot more straightforward in my experience. It's like what C++ used to be.

[ - ] Hobama 0 points 3.4 yearsNov 25, 2021 16:13:05 ago (+0/-0)

If python is a nigger then .net is akin to a feral bantu eating cow shit straight from the ass

[ - ] Temp20210918c 0 points 3.4 yearsNov 25, 2021 00:13:17 ago (+0/-0)*

C# is a very well designed language. It improves over Java which heavily inspired early versions and has a lot of well thought-through influence from Haskell-y language purists in more recent versions.

With .NET Core freely available, there's no reason not to try it out--unless you value your time. Kinda--I think it still has a pretty good job market.

C# compiles to an Intermediate Language (IL) before being further compiled into machine code. The IL can be recompiled after the program has been running for a while using statistics about what kinds of data it tends to encounter to optimize performance. This means you have to work extra hard to beat it in terms of performance for long-running processes like servers. Java is the same way.

Java has been open source longer which probably translates to more frameworks/libraries/tooling and community support (hard to say for sure).

IntelliJ IDEA Community Edition is free and an awesome IDE for Java.

For C#, Visual Studio Code is free and passable. I think most C# authors end up paying for a commercial IDE like Visual Studio (proper) or Rider.

Ultimately, though, I default to writing services in JS/TS and running them on Node. The single-threaded event loop approach is hella vertically-scalable. Of course, you can always scale horizontally, too, as long as you don't screw up your persistence layer.

The main nice thing about JS is that you can define it once but then deploy it to both the server and in various clients.

If, after profiling, you find a hotspot in the JS code, you can always drop that part into Rust to squeeze more performance out.

The Unity game engine is one of the other big reasons people use C#.

[ - ] SithEmpire [op] 0 points 3.4 yearsNov 25, 2021 04:39:09 ago (+0/-0)

C# is OK, unfortunately I think it would have more cross-platform support if it was anyone but Microsoft who wrote it. Been that way since/despite Mono.

[ - ] thebearfromstartrack4 0 points 3.4 yearsNov 24, 2021 21:11:05 ago (+0/-0)

I hate running into crap like that when using a given language on a given platform. Example. Oracle wanted to DROP hp (hardware) but court REFUSED to allow them. SO "we" (Workers) get STUCK with floating point exceptionM (core dumps) and unexpplainable (to a solution) database crashes.

[ - ] Master_Foo 2 points 3.4 yearsNov 24, 2021 18:34:51 ago (+2/-0)

Python is for when you just want to get something done. There's not much point in complaining about it. All virtual languages are shit.

If you want a well designed language, go with D. It's C++ with the boost library built into the language minus all the legacy crap than makes C++ cumbersome.

[ - ] v0atmage 1 point 3.4 yearsNov 24, 2021 18:23:06 ago (+1/-0)

As a dabbler in PL theory I very much agree with you.

Surprised you didn't mention the broken type system!

However, I have to admit that I can still write code faster in python than most other languages.

I think it's because how quickly you can rerun code and inspect it. No compilation overhead and the repl is a first class citizen (aka ipython and jupyter notebooks).

[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:16:10 ago (+0/-0)

write code fast doesn't lend itself to maintainability.

I could write in JS faster than Typescript, but any meaningful work is unmaintainable using straight JS.

[ - ] account deleted by user 1 point 3.4 yearsNov 24, 2021 18:21:34 ago (+1/-0)

account deleted by user

[ - ] v0atmage 2 points 3.4 yearsNov 24, 2021 18:27:48 ago (+2/-0)

Depends on the problem you want to solve typically.

I prefer Rust for high performance. Ocaml, Haskell, or clojure for parsers and compilers, python for quick and dirty data processing.

If Rust is too intense Golang is basically the dumber simpler equivalent.

For web dev you basically use JavaScript or a language which transpiles to it like Typescript or Rescript.

[ - ] headfire 1 point 3.4 yearsNov 24, 2021 19:54:43 ago (+1/-0)

I prefer Rust for high performance.

I prefer strapping waffles to my feet for a sprint race.

[ - ] v0atmage 0 points 3.4 yearsNov 24, 2021 20:15:57 ago (+0/-0)

don't see the analogy. Do you mean it takes a long time to write something in rust?

[ - ] o0shad0o 0 points 3.4 yearsNov 24, 2021 21:24:58 ago (+0/-0)

\snerk

I want to hear the answer to that, too.

[ - ] headfire 0 points 3.4 yearsNov 25, 2021 00:50:34 ago (+0/-0)

Sorry for being unclear. I mean there are source languages with compilers that translate source to machine language that executes in less time for a given algorithm, than either of Rust or Go. Rust is generally suboptimal for performance.

I have no affinity for any particular source language. (Python blows ass for some purposes, so does C, and java and...)

[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:18:47 ago (+0/-0)

Rust is generally suboptimal for performance

this is a bunch of bullshit. "performance"? man you lose credibility when you throw that word around with no context.

So you don't know WTF you're talking about and i will therefore ignore you. thx.

[ - ] headfire 0 points 3.4 yearsNov 25, 2021 18:19:16 ago (+0/-0)

I’ve officially been ignored by the great shitface9000.

lol ok

[ - ] chrimony 0 points 3.4 yearsNov 25, 2021 17:58:18 ago (+0/-0)

Rust is generally suboptimal for performance.

It's the fastest language that has strong language features to avoid the corruption that occurs in C/C++.

[ - ] headfire 0 points 3.4 yearsNov 25, 2021 18:20:19 ago (+0/-0)

Not sure what you mean by corruption (strong v. weak typing, maybe?)

But ok.

[ - ] chrimony 0 points 3.4 yearsNov 25, 2021 19:20:57 ago (+0/-0)

Not sure what you mean by corruption (strong v. weak typing, maybe?)

C/C++ lets you corrupt memory by pointer arithmetic or indexing an array out of bounds. It also is prone to memory corruption by use after free. And it does nothing for thread safety.

[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:36:09 ago (+0/-0)

account deleted by user

[ - ] v0atmage 0 points 3 yearsApr 15, 2022 01:17:17 ago (+0/-0)

I hate JavaScript as much as the next guy but it pretty much dominates web development, hence why people who dislike JavaScript started making transpilers.

[ - ] SithEmpire [op] 0 points 3.4 yearsNov 24, 2021 20:43:48 ago (+0/-0)

I use mostly C99 for low-level and Java for high-level, but obviously it will depend on application.

[ - ] v0atmage 2 points 3.4 yearsNov 24, 2021 21:28:46 ago (+2/-0)

Java was verbose as shit back in the Java6/7 days. Did they fix that in Java9/10 etc.?

[ - ] SithEmpire [op] 2 points 3.4 yearsNov 25, 2021 04:24:32 ago (+2/-0)

It gets occasional brevity improvements here and there, little by little - though nothing striking which would speak out to people who value concise code enough to use other stuff.

8 introduced lambdas, great reduction to the amount of anonymous class ceremony before. It also added object streams, which lets you operate on a collection (filter, map, reduce...), in parallel if it can, without using dozens of lists to store intermediate results.

A few small examples more recently (as of 16):

`switch` can be used as an expression which `yield`s a value, and the case syntax has the lambda treatment.

`instanceof` can now check, cast and assign into scope in one go without having to write the type 3 times.

Interfaces can carry private fields, avoids every implementing class having to supply a data object explicitly.

"Records", or classes for an immutable group of fields, where the assignment constructor and get methods exist implicitly.

[ - ] Teefinyomouf 0 points 3.4 yearsNov 25, 2021 10:34:54 ago (+0/-0)

C. You're not too stupid. Nearly every other language stems from the false pretense that you are too stupid to use C. You are not.

[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 17:52:57 ago (+1/-0)

Julia op

[ - ] v0atmage 0 points 3.4 yearsNov 24, 2021 18:30:48 ago (+0/-0)

Have you used it personally?

[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 19:27:31 ago (+1/-0)

No but I want to switch from python/cython/opencl.

[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 17:52:21 ago (+1/-0)

XD made my day

[ - ] toobaditworks 1 point 3.4 yearsNov 24, 2021 17:51:08 ago (+1/-0)

No switch, no do-while. Yeah fuck python. I dislike java and javascript too.

[ - ] SithEmpire [op] 0 points 3.4 yearsNov 24, 2021 18:26:17 ago (+0/-0)

I have to make one-element arrays in Java because it doesn't have pointers, just so the array can be `final` and its content can be modified within a lambda. Then I usually find out the lambda needs to throw, which the caller is able to catch, but now it needs a custom interface definition just to put `throws` in the method signature. Sigh.

My greatest annoyance with JS is that it is basically the reason websockets had to exist, just to cater to being event driven only. If browser JS could read a socket asynchronously then we would only need HTTP CONNECT as opposed to another shit protocol to implement.

[ - ] Temp20210918c 1 point 3.4 yearsNov 24, 2021 17:45:40 ago (+1/-0)*

I've never had to maintain anyone else's Python. If you're familiar with it, though, it works well for < ~200 line one-off/personal scripts. I like not having to balance brackets when I'm just trying to dash something off. Low contrast but visible whitespace is a must for Python--you gotta be able to see when tabs have gotten mixed up with spaces.

Other frameworks/libraries of note for data:

\ Jupyter / matplotlib
\
Pandas
\ SciPy (often goes with NumPy that you mentioned)
\
It's also a driver lang for some deep learning frameworks e.g., Keras, TensorFlow, Theano, Torch, etc. A lot of the linear algebra logic for those back-ends are actually written in Fortran

I've heard it said, "There are two types of data scientists: mathematicians who understand programming better than their peers vs software engineers who understand math better than their peers."

You might be maintaining code from the first group. If that's the case, it's likely to be unmaintainable crap (code-wise) no matter which language it's written in.


For regular software written by large teams, you gotta have static typing and some common/idiomatic means of encapsulation. Python is not a fit there.

For my use in smaller projects, Python is significantly preferable to Perl and way more preferred over Ruby.

Modern JS, though, takes the cake for interpreted general languages. I/O concurrency via async/await, optional structural typing via TS and V8 performance optimizations are all killer features.

[ - ] Yargiyankooli 7 points 3.4 yearsNov 24, 2021 17:17:02 ago (+7/-0)

I am a Python developer and my gut reaction to your title was "okay normie is just upset because he cannot code", but I ended up agreeing with you on everything. Especially threading, it has been a huge hassle and only recently did we figure out it was not doing what we expected it to do.

[ - ] SithEmpire [op] 4 points 3.4 yearsNov 24, 2021 18:09:25 ago (+4/-0)

Thank you, good to know that it's not just a form of experience bias on my end. I think I understand how Terry Davis felt all that time.

[ - ] Yargiyankooli 2 points 3.4 yearsNov 25, 2021 01:11:50 ago (+2/-0)

Python has enabled my wife and I to leave academia and triple our salaries in less than 2 years of study and job hunting. I will always be eternally grateful for that.

However, I am sure if I said "I am going to learn C#" instead of Python, I probably would have had similar results.

[ - ] lord_nougat 0 points 3.4 yearsNov 24, 2021 16:53:09 ago (+0/-0)

Meh.

I'm gonna just go back to perl scripting.

[ - ] deleted 1 point 3.4 yearsNov 24, 2021 16:15:47 ago (+1/-0)

deleted

[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:31:51 ago (+0/-0)

account deleted by user