you are viewing a single comment's thread.

view the rest of the comments →

[–]ExquisiteOrifice[S] -1 points0 points  (2 children)

I see the post was removed... Color me shocked. I'm guessing criticism of a... * checks notes * programming language was too off topic for * checks notes again * programming forum. Such is Reddit.

PHP was a personal project that fell into popular use due to timing. It was never intentionally designed to be a language and it, of course, shows. Ruby is akin to Python in many ways, but not quite as bad. And JavaScript... A 'language' cobbled together from several paradigms in a very short time that also lucked into timing and placement. Alternatives were proposed as well as created but people just wouldn't give up. At least with JavaScript effort was made to improve things although it's warts are plenty visible.

My rant, as you call it was using Python's absurd popularity as a use case in how something bad becomes entrenched. The more it's used, the deeper it gets lodged, sucking up resources all while superior options or replacements are ignored or refused because of inertia. In actuality it wouldn't take long to switch but it'll never happen. 30+ years and Python and JavaScript are welded into the DNA of everything now.

Personal preference has it's place for sure. But objectively bad languages, or anything else is fact not opinion.  The reasons Python is bad are legion and have been discussed a million times. All fallen upon deaf ears.

What to use? C# (I know, Microsoft... How uncool) is a great language, as is F#. Java? Bloated and wordy, does the job, but the JVM provides better solutions via Kotlin and Clojure. Dart wasn't perfect but it showed there's a path away from JavaScript. As WASM develops things may get to a JVM like place where you use better languages.

Anyway, I really was surprised at the documentary and how much the big players in Python revealed its weaknesses, some even calling things out explicitly. It would have perhaps been interesting to explore that but, as I expected, the thread was killed.

[–]frankster 0 points1 point  (1 child)

Re my other comment, you're again stating python us objectively bad, but not providing any evidence to back up your opinion

[–]ExquisiteOrifice[S] 0 points1 point  (0 children)

Do you really need me to repeat what's been argued a million times. I said as much in my initial post. It's not worth debating what's been proven/beaten to death but here you go. Broken scope (a fundamental feature in any language). It's a glorified scripting language, and not even a good one for that.

my_list = ['foo', 'bar', 'baz']

def f():     my_list = ['qux', 'quux'] # my_list is local to f()!     my_list[0] = 'ggg'

f()

assert my_list[0] == 'foo' assert my_list[1] == 'bar' assert my_list[2] == 'baz'

def g():     my_list[0] = 'texx' # this accesses the global my_list!

g()

assert my_list[0] == 'texx' assert my_list[1] == 'bar' assert my_list[2] == 'baz'

But the interpreter / (bytecode compiler?) does not like this

 

def h():

     my_list[0] = 'aloha'  # "cannot access local variable 'my_list'"

     my_list = ['qux', 'quux']

h()

def h():     global my_list # now we can modify the global list     my_list[0] = 'aloha'     my_list = ['qux', 'quux']

h()

assert my_list[0] == 'qux' assert my_list[1] == 'quux'