Python

Why is it so hated?

Other urls found in this thread:

docs.python.org/3.7/reference/grammar.html
twitter.com/SFWRedditVideos

Because it's shit made for retards.

Because it triggers the uncomfortable realization that one need not spend 14 gorillion hours memorizing the idiosyncrasies of dogshit languages (e.g. C++ and PHP) in order to write code that works well. Basically, people can't deal with the fact that they got memed on, so they cope by hating the obviously superior thing.

That's not an argument. Is it slow? Limited?

Talking as a experienced programmer?

Because people try to compare it with languages the don't fit the same use case.

Python is good at what it does, which is allow you to write quick scripts and simple tasks. The larger a project gets it may be more difficult to manage in python, but at that point you shouldnt be using python at all.

So it's just a good learning language?

Not this guy, but I am talking as an "experienced programmer", who has also been programming Python.

The problem is not Python, C++ or any other language -- the problem is the environment in which yo gain this bias, namely Sup Forums. This is a cesspool of people who want to feel intellectually superior to others, and the best way to do so is to belittle people who they perceive to be below them in their choice of programming language.

Accessible languages, such as Python for example, become the languages perceived by those people as the "easier" language, while all it really is -- is more accessible.

No because it is also useful for getting things done. It might not be as fast as C++, but it often just werks. If that is what you need, then it is good for that

No you can write proper, big software in Python. For example Calibre. There's also now typehinting integrated into the language (optional), which opens the doors for static type checkers etc. Whatever problem there is currently because of a lack of static typing will soon be gone, if that's the actual bottleneck to writing "big software".

What this guy said might be true to an extent, however I haven't really seen any evidence for it to be as bad as most people claim.

Semantic whitespace

Sort of. It has a fair amount of idiosyncrasies and magic that doesn't translate well into other languages, but it's a decent starting point for learning if you want to just do light shit like .

Ah yes, see here:

>major in computer engineering
>work hard, focus on working with c and assembly
>work on tons of projects
>spend years searching for an embedded sw dev job
>finally find embedded c/c++ dev job
>$50k
>friend has no interest in technology, majors in cs
>no projects
>applies to first python job listing he finds
>gets it
>$110k

>the easiest language is the one that hasn't been colonized by Pajeets
really depolarizes one's axons

you forgot the part where he lives in mexico 2.0 where 50% of his salary goes to taxes, and 40% to his housing.

I use Python at work every day. I don't hate it so much as find it a bit dull. It de-emphasizes functional programming and some of the libraries (I'm looking at you, sqlalchemy) feel a bit overengineered and hard to reason about.

It's a great business decision though. Python has loads of mature libraries maintained by Other People.

Is it fast?

Just don't like it. Don't like Java either. But then again I have thousands of hours on C++ and Perl. I find it not practical to learn another language when I already know two and a variety of other scripting like bash, powershell, etc.

It's like learning Pascal....why? Because that is what the recruiters have a hard on for this month? It'll change next month.

It's fast enough for 99% of things you could want to do. If you are doing something in the 1% use Cython or use C to write the C-bindings yourself.

I've found myself guilty of this. I'm reformed though and have been a mildly enthusiastic python developer for a few years since. My background in C/C++ biased me heavily against crass scripting languages, python in particular, but when a tool works and it's efficient, there's nothing to complain about.

Slow.

Use Go as an alternative. Node if you're a noobie.

Languages aren't fast or slow. CPython is slow, PyPy is middle of the road. There are some experimentalish things like Nuitka (a Python to C++ compiler) and RPython (a restricted dialect of Python with a compiler) that are fast, but I've never used them. Python also has a decent C FFI. When the speed of your Python runtime is the bottleneck, you have options.

Anyone with Python web dev experience? How is it compared to PHP?

>slow
>python 2 vs python 3

It's relatively simple, which triggers the shit out of everyone who learned a more difficult language.
Especially since for a lot of applications the slower speed isn't too bad if you don't go for full retardo programming but instead use numpy & co

because this is Sup Forums

>python 2 vs python 3
?

I always find this really fucking weird.

>work in academia so everything is full of Pajeets
>when they have to do some light calculation they start writing Fortran programs for it
>none of them knows Python

How? It is so fucking easy, it would take an afternoon to look up the stuff.

College or high school?

mediocre

slower than javascript

what the fuck made you think anyone cares about firmware fags?

there is a reason firmware is literally garbage ware.

What the fuck are you talking about?

are you dumb enough to think anyone cares about actually writing quality embedded shitware?

Yes.

i'm so sorry.

Don't listen to this retard acting like he is some kind of job market analyst.

Kids.

print vs print()

I'm fine with python but it's fucking ridiculous how horrible the stdlib is, even in 3

Print is a function. So?

Because it's a very poorly designed language that has dozens of poorly thought out features instead of small powerful core. 99% of new features to Python require modification to the parser whereas in better language the same features could be simple libraries. In terms of dynamically typed languages, Smalltalk, Ruby, Scheme, Common Lisp, Clojure, Lua and Julia are all much better.

Then they broke compatibility without fixing any of the glaring problems and are now adding an extremely poorly thought out coroutine and async system that almost nobody understands and has hundreds of bugs. It's so poorly thought out that you have to pass around the event loop or rely on error prone hacks like attaching the event loop to the current thread. It's just a huge mess.

> Because it's a very poorly designed language that has dozens of poorly thought out features instead of small powerful core. 99% of new features to Python require modification to the parser whereas in better language the same features could be simple libraries. In terms of dynamically typed languages, Smalltalk, Ruby, Scheme, Common Lisp, Clojure, Lua and Julia are all much better.

Absolute bullshit.

However, I do agree with the async bullshit.

100% truth. Most "features" in Python would be trivial libraries in better languages like Smalltalk.

Na. What are you even talking about when you say "modifications to the parser"? The only thing that comes to mind is the async-thing, which you again mentioned a paragraph below.

I never said I was a job market analysis.

I'm just telling you the cold hard facts that most fucking embedded development is done by copy pasta chinks who can't program for shit.

Where do you get that information from?

He is a a job market analysis.

b-but they gotta compete against javascript somehow

Most features that have been added to Python over the last 10 years require changes to CPython at the parser level because Python is a poorly thought out language. A ton of Python features (such as list/dict/set comprehensions, decorators, context managers and the ever expanding set of string prefixes) could be implemented as libraries in better languages. Half of these "features" are just hacks around the fact that Python has crippled lambdas and far too many statements.

You mean syntactic sugar? Retard.

If your language requires syntactic sugar for most of those things it's fucking garbage.

It doesn't, that's why I called you a retard. All the features you listed can easily be used with the core language.

...

Well, I like it

xrange vs range

If you want to write hundreds of one off "named" functions and have them clutter your namespaces or function definitions. They were added because Python is shit and doing so is painful.

Use Python 3 ffs.

If I ever migrate off 2 it will be to a different language.

Still not sure what this has to do with the features you listed in your earlier post, that were clearly just syntactic sugar. Nice meme though bro. Good night, done wasting my time with you.

Bye retard.

Not until bdfl recognizes his fuckup

nice to learn,nice to model,nice to play.
But fucking hell on deploy.
implementation is shit, Ruby even gets better.

enjoy your security vulnerabilities, you memeworthy luddite

>that were clearly just syntactic sugar

That required changes at the parser level and were implemented because the core Python language was so fucking bad that very simple abstractions were extremely painful to write. By Python 3.7 it's going to be more complicated than C++.

Redhat, Dropbox, Google and a ton of other companies will provide support for Python 2.7 for decades after 2020. Not one of them has even considering a serious migration to Python 3.

Source?

>Dropbox, Google
both are already porting their Python 2 code to Go
but sure, keep waiting for those security patches that will never materialize

this is why python is shit

docs.python.org/3.7/reference/grammar.html

>both are already porting their Python 2 code to Go

Very specific projects that are performance critical are being ported to Go. Both companies have millions of lines of Python 2 code that will never, ever be migrated.

...

if you think a language laden with a fucking statement for everything is good, then you might be crazy.

Next version of RHEL ships with Python 2.7 and Redhat guarantees security patches for all core components for a minimum of 10 years.

Forced indentation of snek

Even Perl 6 isn't this bad.

i have a really stupid question about python. how are you supposed to know if your program works or not without running it? like c++ has strong typing, so if you do 5 + "hi" it will tell you that's wrong. but python doesn't do shit until you run it. are you supposed to rigorously test every code path in python? or is there a linter or something that i'm missing

> are you supposed to rigorously test every code path in python

Basically.

> or is there a linter or something that i'm missing

There are linters but they can't give you even a small fraction of the guarantees a good static type system can.

No += and ?:, code style is forced by compiler.
Enough for calling it shit.

Interpreted language.

Shitty type system, shitty speed, shitty management (2.7 vs 3.0)

I like python but i have spent the last 2 days trying to find what path is wrong and crashes opencv.
Maybe i am a retard but man this is hard.

>No Semicolons and curly brackets
>Weird typing system
>Forced code style
>Fucked up operators such as assignment

I know this is a typical noob question. But this is an honest question. What things do you need to know how to do with a programming language in order to get an entry level job?

Python is so awesome it needs two forks running at the same time!!!!!

You need to be able to translate basic English into that programming language. See basic stuff like Fizzbuzz.

no monads

Oh! Thanks user I'm just lurking to see what programming is all about. I know a little bit of JavaScript but I never really dove in too deep.

because people actually use it

nice b8

whitespace and the 3.0 split.

Other than those two things it's fine.

Nice shitpost. Retard.

It's kinda slow

Template Python here we come.

python definitely has +=, in addition to a ton of augmenting assignment operators, though it doesn't have a ternary operator. It's clear you're speaking from ignorance.

3.0 hasn't been an issue for a while. This isn't 2010 anymore.
You'll indent your code anyway so whitespace isn't really an issue either.

Here are some actual issues with Python:
- unreliable code analysis/completion tools (pic related)
- complicated package publishing process compared to e.g. Ruby, Node and Go
- lack of a "?." operator
- bad lambda syntax
- convoluted standard async library

Yes, it is pretty slow and the multithreading support is terrible/nonexistent

>multithreading support is terrible/nonexistent
Python can create native threads just fine, the interface is easy to use too.
You can also very easily create a process pool and submit long running cpu intensive tasks to it if you need multiple cores.

Pypy is quite fast.

import task
data = open(data.txt, r)
for piece in data:
task(piece)


The above code can accomplish basically any data processing task with slight modifications

In short, it's too easy so it invites casuals but doesn't prompt them to form any deeper understanding of what's going on. Meanwhile people who learned on C have to manually allocate memory and manually deal with pointers and other low level drudgery and these people are angery that others don't have to suffer in that way before being able to accomplish meaningful tasks

PHP is like starting to write a book by cutting down trees to make paper as your first step and Python/Django is like having your book already written for you.

>If your language requires syntactic sugar for most of those things it's fucking garbage.
Lol. This is the kind of statement made by someone who has been fucked in the ass by pointer errors their entire life and can't cope with the fact that finishing a program on time is often more important than having it run 1% faster.

There is no such thing as an "interpreted language". Nice meme.

Programming in any other language than C++ is like programming in C++ but being forced to use specific libraries with poorly defined cumbersome functions,

Once you have learned the syntax of c++ you will realise how easy it actually is, you can define your own functions to avoid repeating code, by far superior to other languages