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
[ + ] Yargiyankooli
[ - ] Yargiyankooli 7 points 3.4 yearsNov 24, 2021 17:17:02 ago (+7/-0)
[ + ] SithEmpire
[ - ] SithEmpire [op] 4 points 3.4 yearsNov 24, 2021 18:09:25 ago (+4/-0)
[ + ] Yargiyankooli
[ - ] Yargiyankooli 2 points 3.4 yearsNov 25, 2021 01:11:50 ago (+2/-0)
However, I am sure if I said "I am going to learn C#" instead of Python, I probably would have had similar results.
[ + ] Broc_Liath
[ - ] Broc_Liath 1 point 3.4 yearsNov 25, 2021 14:15:32 ago (+1/-0)
[ + ] o0shad0o
[ - ] o0shad0o 2 points 3.4 yearsNov 24, 2021 21:21:10 ago (+2/-0)
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
[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:14:21 ago (+0/-0)
[ + ] o0shad0o
[ - ] o0shad0o 0 points 3.4 yearsNov 25, 2021 08:45:39 ago (+0/-0)*
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
[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:30:46 ago (+0/-0)
[ + ] Master_Foo
[ - ] Master_Foo 2 points 3.4 yearsNov 24, 2021 18:34:51 ago (+2/-0)
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.
[ + ] ForgottenMemes
[ - ] ForgottenMemes 1 point 3.4 yearsNov 25, 2021 01:34:00 ago (+1/-0)
[ + ] account deleted by user
[ - ] account deleted by user 0 points 3.1 yearsMar 27, 2022 23:28:47 ago (+0/-0)
[ + ] Deleted
[ - ] deleted 1 point 3.4 yearsNov 24, 2021 21:13:24 ago (+1/-0)
[ + ] o0shad0o
[ - ] o0shad0o 0 points 3.4 yearsNov 24, 2021 21:23:10 ago (+0/-0)
[ + ] Broc_Liath
[ - ] Broc_Liath 0 points 3.4 yearsNov 25, 2021 14:20:24 ago (+0/-0)
C# is a lot more straightforward in my experience. It's like what C++ used to be.
[ + ] Hobama
[ - ] Hobama 0 points 3.4 yearsNov 25, 2021 16:13:05 ago (+0/-0)
[ + ] Temp20210918c
[ - ] Temp20210918c 0 points 3.4 yearsNov 25, 2021 00:13:17 ago (+0/-0)*
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
[ - ] SithEmpire [op] 0 points 3.4 yearsNov 25, 2021 04:39:09 ago (+0/-0)
[ + ] v0atmage
[ - ] v0atmage 1 point 3.4 yearsNov 24, 2021 18:23:06 ago (+1/-0)
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
[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:16:10 ago (+0/-0)
I could write in JS faster than Typescript, but any meaningful work is unmaintainable using straight JS.
[ + ] account deleted by user
[ - ] account deleted by user 1 point 3.4 yearsNov 24, 2021 18:21:34 ago (+1/-0)
[ + ] v0atmage
[ - ] v0atmage 2 points 3.4 yearsNov 24, 2021 18:27:48 ago (+2/-0)
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
[ - ] headfire 1 point 3.4 yearsNov 24, 2021 19:54:43 ago (+1/-0)
I prefer strapping waffles to my feet for a sprint race.
[ + ] v0atmage
[ - ] v0atmage 0 points 3.4 yearsNov 24, 2021 20:15:57 ago (+0/-0)
[ + ] o0shad0o
[ - ] o0shad0o 0 points 3.4 yearsNov 24, 2021 21:24:58 ago (+0/-0)
I want to hear the answer to that, too.
[ + ] headfire
[ - ] headfire 0 points 3.4 yearsNov 25, 2021 00:50:34 ago (+0/-0)
I have no affinity for any particular source language. (Python blows ass for some purposes, so does C, and java and...)
[ + ] shitface9000
[ - ] shitface9000 0 points 3.4 yearsNov 25, 2021 04:18:47 ago (+0/-0)
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
[ - ] headfire 0 points 3.4 yearsNov 25, 2021 18:19:16 ago (+0/-0)
lol ok
[ + ] chrimony
[ - ] chrimony 0 points 3.4 yearsNov 25, 2021 17:58:18 ago (+0/-0)
It's the fastest language that has strong language features to avoid the corruption that occurs in C/C++.
[ + ] headfire
[ - ] headfire 0 points 3.4 yearsNov 25, 2021 18:20:19 ago (+0/-0)
But ok.
[ + ] chrimony
[ - ] chrimony 0 points 3.4 yearsNov 25, 2021 19:20:57 ago (+0/-0)
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
[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:36:09 ago (+0/-0)
[ + ] v0atmage
[ - ] v0atmage 0 points 3 yearsApr 15, 2022 01:17:17 ago (+0/-0)
[ + ] SithEmpire
[ - ] SithEmpire [op] 0 points 3.4 yearsNov 24, 2021 20:43:48 ago (+0/-0)
[ + ] v0atmage
[ - ] v0atmage 2 points 3.4 yearsNov 24, 2021 21:28:46 ago (+2/-0)
[ + ] SithEmpire
[ - ] SithEmpire [op] 2 points 3.4 yearsNov 25, 2021 04:24:32 ago (+2/-0)
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
[ - ] Teefinyomouf 0 points 3.4 yearsNov 25, 2021 10:34:54 ago (+0/-0)
[ + ] Nagasaki
[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 17:52:57 ago (+1/-0)
[ + ] v0atmage
[ - ] v0atmage 0 points 3.4 yearsNov 24, 2021 18:30:48 ago (+0/-0)
[ + ] Nagasaki
[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 19:27:31 ago (+1/-0)
[ + ] Nagasaki
[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 19:41:28 ago (+1/-0)
https://www.quora.com/What-advantages-and-disadvantages-does-Julia-Programming-have-over-Python-as-a-general-purpose-language-Will-Julia-surpass-Python-as-the-de-facto-standard-for-machine-learning-scientific-computing-and-data-science
[ + ] Nagasaki
[ - ] Nagasaki 1 point 3.4 yearsNov 24, 2021 17:52:21 ago (+1/-0)
[ + ] toobaditworks
[ - ] toobaditworks 1 point 3.4 yearsNov 24, 2021 17:51:08 ago (+1/-0)
[ + ] SithEmpire
[ - ] SithEmpire [op] 0 points 3.4 yearsNov 24, 2021 18:26:17 ago (+0/-0)
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
[ - ] Temp20210918c 1 point 3.4 yearsNov 24, 2021 17:45:40 ago (+1/-0)*
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.
[ + ] Deleted
[ - ] deleted 1 point 3.4 yearsNov 24, 2021 16:15:47 ago (+1/-0)
[ + ] account deleted by user
[ - ] account deleted by user 0 points 3 yearsApr 14, 2022 22:31:51 ago (+0/-0)
[ + ] albatrosv15
[ - ] albatrosv15 0 points 3.4 yearsNov 25, 2021 03:33:03 ago (+0/-0)
[ + ] thebearfromstartrack4
[ - ] thebearfromstartrack4 0 points 3.4 yearsNov 24, 2021 21:11:05 ago (+0/-0)
[ + ] lord_nougat
[ - ] lord_nougat 0 points 3.4 yearsNov 24, 2021 16:53:09 ago (+0/-0)
I'm gonna just go back to perl scripting.