DEV Community

Discussion on: Why all this hate about Python?

Collapse
 
leonetienne profile image
Leonetienne • Edited

Easy to read?!
Did you just say python is easy to read?!

Are you joking?!

Python is the most unreadable language i have encountered!
(i mainly program in c++ in VS)
If we're not counting "Brainfuck" that is.

Python is just confusing.
Variables have no defined types, you can write code outside functions, it doesn't use curly brackets, so it relies solely on insets. Also the default ide is more than shit. No line numbers, not even auto correction suggestions or anything like intellisense.

I once had to program in python because of a certain Library Wrapper. After two hours of missing my dearest c++, i just resorted to call my script.py via the system() function in c++ storing the return value in a textfile...

Over all 1/10.

And this one point is just because i love how easily you can import libraries via pip3

Collapse
 
aoeu256 profile image
Alexis Rodriguez

The types of variables are constrained by the operations you use in the function definition, and of course its name. For example,
def myadd(a, b):
----return a + b
Rather than thinking about a and b as numbers [isinstance(a, Number)], think of them as variables that have the +(add) operator i.e: ['add' in a.class or hasattr(a, 'add')]. Another thing you can do is look at its callers, or setting a break point inside the function.