3 ms·
My personal reasons why python is the language I hate to love: - it is 100x slower than C++, so you need 100,000 servers rather than 1000 - python 3 broke bac
by musicale 7y ago
My personal reasons why python is the language I hate to love:
- it is 100x slower than C++, so you need 100,000 servers rather than 1000
- python 3 broke backward compatibility with python 2, creating unnecessary chaos
- python 3 removed the wonderful print statement, which could have coexisted peacefully with the print function but no!!!
- pytype and pylint suck and are very slow
- even though it supports coroutines, concurrency and parallelism support is poor
- there isn't a commonly available native compiler for it
- pep8 recommends mixing camelCase and stupid_underscores (and has lots of other things I hate)
- the base constructor method must be called __init__
- the if __name__ == '__main__': idiom is evil
- map, filter, lambda etc. are all deprecated, but their replacements aren't always better
- no repeat..until or do..while loop
- range() is often confusing (e.g. range(0, n+1)) and there doesn't seem to be a built-in inclusive range iterator (e.g. start..finish or irange(start, finish, step))
- there doesn't seem to be a standard format for docstrings
- multidimensional arrays/matrices are clunky
- it has three exit() functions: exit(), sys.exit() and os.exit() - but sys.exit() is the one you're supposed to use
- (controversial I'm sure) you can't use minus signs in identifiers
- implementing numerical types is hard, making dimensional analysis hard
- scrollaway 7y agoWhat? Some of these assertions are so wrong I don't even know where to begin correcting them. > it is 100x slower than C++, so you need 100,000 servers rather than 1000 This is not even sort of how it works. > the wonderful print statement, which could have coexisted peacefully with the print function No, it couldn't have. It really couldn't have. > pep8 recommends mixing camelCase and stupid_underscores pep8 doesn't recommend camelCase anywhere. > the if __name__ == '__main__': idiom is evil … evil? I'd prefer a "def __main__" myself but… evil? > map, filter, lambda etc. are all deprecated they are not > there doesn't seem to be a built-in inclusive range iterator there is, it's called range(). > there doesn't seem to be a standard format for docstrings there is. > you can't use minus signs in identifiers you syntactically can't, but given your other assertions, this isn't even sort of controversial.
- j88439h84 7y agoPylint takes a processors argument. I just use attrs for all my classes to avoid writing init and repr. Trio's idea of enforcing structured concurrency is very nice. Agree that parallelism is still weak though.