Reasons why Python 3 (and 2) is shit (26)

1 Name: #!/usr/bin/anonymous : 2017-06-16 00:22 ID:jv9oB1f2 This thread was merged from the former /code/ board. You can view the archive here.

  • FOIC
  • reduce is not built-in
  • no do-while statement
  • singled expression lambdas
  • no index lists
  • no frozenset literals
  • awfully bad scope rules
  • terrible OOP design
  • no pattern matching nor switch-case statements/expressions

2 Name: #!/usr/bin/anonymous : 2017-06-17 05:19 ID:Heaven

The forced indentation of code

3 Name: #!/usr/bin/anonymous : 2017-06-17 17:43 ID:ilN/++Zs

  • Try the Don't Indentation Any Code at $WORK for a month and tell me how that goes
  • reduce is Microsoft speak for fold-left, so that's actually a plus
  • why single out do-while? Do you even have named let in your favorite language?
  • Correct
  • I don't know what this is but it sounds specific to your favorite language
  • See above
  • Correct
  • As with all OOPs other than Smalltalk and CLOS
  • Correct, but switch/case is a specific form of pattern matching, and most other popular languages only started thinking about very limited pattern matching and destructuring bind (as separate features) in the last 5 years

4 Name: #!/usr/bin/anonymous : 2017-06-19 22:30 ID:jv9oB1f2

>>3
``reduce'' have been in LISPs before Microsoft was even created.
Frozensets are immutable sets in Python.

5 Name: #!/usr/bin/anonymous : 2017-06-21 19:33 ID:ilN/++Zs

>>4
Oh damn, busted. I must have been thinking of "accumulate".

They really don't have that? Does it at least have immutable map literals?

6 Name: #!/usr/bin/anonymous : 2017-07-03 23:23 ID:jv9oB1f2

>>5
No and no. Guido van Rossum is against immutability. He is also against TCO and recursion in general (search for: "neopythonic" "tail recursion elimination")

7 Name: #!/usr/bin/anonymous : 2017-07-16 19:53 ID:M3qI9Fmx

>>2
There is nothing wrong with forced indentation. A good programmer shall indent their code regardless. A bad programmer will make everything look like shit so forced indentation makes his good usable to others besides himself.

8 Name: #!/usr/bin/anonymous : 2017-07-16 19:55 ID:M3qI9Fmx

> no do-while statement

There already is while. A do-while construct is redundant.

9 Name: #!/usr/bin/anonymous : 2017-07-20 19:37 ID:ilN/++Zs

>>8
Both for and named let subsume while, to boot.

10 Name: #!/usr/bin/anonymous : 2017-08-30 00:30 ID:jv9oB1f2

Reason#381: [i]inconsistency and lack of abstraction for array declarations[/i] https://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list

11 Name: #!/usr/bin/anonymous : 2017-08-31 16:55 ID:jv9oB1f2

12 Name: #!/usr/bin/anonymous : 2017-09-03 18:53 ID:eycA3OAX

  • GIL
  • metamethods
  • attributes

13 Name: #!/usr/bin/anonymous : 2017-09-06 19:50 ID:zwyhM5U6

>>7
Yes but they'll indent it in a specific way, while the compiler won't compile if someone uses the "wrong" whitespace.

14 Name: #!/usr/bin/anonymous : 2017-09-06 20:16 ID:Heaven

>>13
They'll indent it in a shitty, inconsistent way, because they're a bad developer, and the compiler will force them to not do that.

15 Name: Gleb : 2018-07-23 21:12 ID:+fA6NNP7

I think that the main thing here is that Python is quite cool and better than some other languages. Plus taking into account the list of available frameworks (https://webcase.studio/blog/best-python-frameworks/), you can see that it's possible to create everything with this powerful language!

16 Name: #!/usr/bin/anonymous : 2018-07-25 06:00 ID:Heaven

>>15

> it's possible to create everything with this powerful language!

ok, how do i create a multithreaded program using a runtime with no global interpreter lock?

it would be nice if the variables used had enforced static typing too

17 Name: #!/usr/bin/anonymous : 2018-07-31 19:41 ID:5o4nANVW

>>15
There are a damn lot of languages, so "better than some other languages" is a little faint praise.

>>16
A bit of a cheap shot, don't you think? How about "how do I introduce a new operator without the inventor of the language quitting"

18 Name: #!/usr/bin/anonymous : 2018-10-02 02:33 ID:Heaven

>>14
It's really annoying when I have to change scope and need to manually delete X spaces from each line for a specific block, if I had braces I could just add or remove them.

19 Name: #!/usr/bin/anonymous : 2018-10-14 01:29 ID:j50HCb9X

{
@prefix dbr: <http://dbpedia.org/resource/>.
<#op> a dbr:Faggot_%28slang%29 .
}

20 Name: #!/usr/bin/anonymous : 2018-10-14 14:23 ID:5o4nANVW

>>18
Use a better text editor than notepad. Seriously.
Select line range and tab or shift-tab to change indentation in notepad++, visual studio, vscode, probably most other windows software. << and >> in vim.

21 Name: #!/usr/bin/anonymous : 2019-08-09 12:02 ID:G8sTA6MV

I wouldn't say Python is shit.

It's a Language that has it's Ups and Downs. The same applies to all Languages. No Language is perfect.

I myself hate Python due to it's Syntax, how it handles Whitespace and the fact that it's an over-rated Language.

22 Name: #!/usr/bin/anonymous : 2019-08-11 18:15 ID:RGyzdZ1B

it's a programmign language. It's quite trash but there are worse. it works fine if you want to do something quickly, and has a great net scraping library.

much better for taping things together than php

23 Name: #!/usr/bin/anonymous : 2019-11-18 20:16 ID:SKj3RXIt

it breaks everything whenever you actually have to do something important on a non-debian based distro

24 Name: #!/usr/bin/anonymous : 2020-04-09 23:19 ID:574Yv04T

Python is a great scripting language, you don't need everything to have fun.

I can write a simple script with command-line arguments to read an Excel file, dump JSON, parse everything, talk to a database, in a few lines of code.

Add PIP and venv, and you have a brain orgasm for your daily tasks. No language is perfect.

25 Name: #!/usr/bin/anonymous : 2020-09-09 01:55 ID:gtsRtqWp

26 Name: Anonymous Techie : 2021-04-14 12:15 ID:Heaven

It's one of the best languages out there, simple and elegant. Just don't use it for heavy lifting tasks, use C++ or something else for those. Python performance isn't the best.

Golang promised me "something in between python and C++", but it's so inbetween it doesn't cover either niche well. It's not as easy to write in as python, it's a somewhat awkward language. And it's more limited than C++, you can't remove the garbage collection out of it.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: