Sure Python has many problems, but these aren't a great selection. > The syntax for classical inheritance. Half of each Django app is super().__init__( args, *kwargs). At least you don't have to pass arguments to super anymore. Yes, inheritance is hard to do well, but that's generally true. Much better to prefer composition ( https://en.wikipedia.org/wiki/Composition_over_inheritance ) > Too many magic __double-under…
Sure Python has many problems, but these aren't a great selection. Yes. I have my disagreements with Python, but those are not it. The article author is mostly complaining about ways Python differs from Javascript. - Agree that the mechanism for talking about parent classes wasn't very good. Multiple inheritance usually adds complication without adding much necessary functionality. That's not just a Python problem. I…
Python is not a great programming language
101–110 of 156 posts
Re: Python is not a great programming language
#102TLDR: if you’re a new programmer, don’t take this seriously. This person clearly doesn’t understand programming languages so well. Sorry to make this response an “ad hominem” one, I should revoke the claims. But it’s impossible if they don’t understand basic concepts of programming languages. For example, complaining that a dictionary key must be place in quotes. It’s not that “the key needs quotes”, but that you’re…
Re: Python is not a great programming language
#103Re: Python is not a great programming language
#104Earlier quoted context omitted.
>Either way, if the number of idiosyncracies in your language is confusing to junior developers it's absolutely something worth considering. Why? Aiming for the lowest common denominators and the simplest systems tends to not create scalable long term solutions. You also seem to really undercount what a properly trained junior developer is capable of understanding.
Most popular programming languages got popular by aiming for the LCD in some capacity, e.g. Java. It's the reason why we're not all writing LISP or Haskell.
Java rode a couple of different trends at the same time: it provided a somewhat smooth upgrade path from C++, cross-platform compatibility, and an astronomical marketing budget.
Many languages in the top-10 that we believe are popular or mainstream got there by having one of platform lock-in, smooth upgrade from a prior language, or a killer, exclusive app. It's a lot less about what is good or objectively better and more about being in the right place at the right time.
I've heard some claim that Python got there by being slow and steady. At one point I think I would have agreed but it does have a killer app and that's in the analysis, scientific and machine learning communities.
Re: Python is not a great programming language
#105Re: Python is not a great programming language
#106Earlier quoted context omitted.
> I guess I just didn't realize how bad a programmer knowing (only/mainly) JavaScript causes you to be. Hey now - not all of us ECMA devs are total crap, but, I guess I know a fair bit of other languages. This guy is just totally ... I have words for it but I'd rather not get the mods on me. I struggled with an appropriate way to say this but I think he's super pretentious and just sounds frustrated with learning a n…
I struggle with learning new languages from time to time and there's always been a learning curve from starting out to being proficient. But while Python itself I think provides an awesome developer experience, django seems less than awesome, and it's taken a while for me to feel proficient in Django.
That all said, I do love me some Python though! I use it as a general purpose tool to get semi-complex things done that are more scripting/job oriented vs. needing the orchestration that Django brings to the table. You could say it's a "cog" for me vs. the overall machine/engine.
It's on my TODO list to get into some other Python framework libraries because I've seen lots of promising ones pop up since Django, if anyone has suggestions of what to poke my nose into I'm all ears!
Re: Python is not a great programming language
#107TLDR: if you’re a new programmer, don’t take this seriously. This person clearly doesn’t understand programming languages so well. Sorry to make this response an “ad hominem” one, I should revoke the claims. But it’s impossible if they don’t understand basic concepts of programming languages. For example, complaining that a dictionary key must be place in quotes. It’s not that “the key needs quotes”, but that you’re…
Any hashable object, technically. Especially with custom objects, the two (immutability and hashability) don’t necessarily have to overlap, although it’s often a bad idea to have hashable, mutable objects
Re: Python is not a great programming language
#108> you have to do foo.get('bar')... or in some cases getattr(foo, 'bar', None) This is a mistake based on thinking in Javascript: in JS the index operator is effectively the same as the dot operator, for example foo[“bar”] == foo.bar. In Python those are different. [] corresponds to get in dicts, and . corresponds to getattr in objects. My personal biggest gripe with Python is that there isn’t a better story for typin…
Re: Python is not a great programming language
#109Earlier quoted context omitted.
I personally find list comprehensions in python pretty horrible. They seem to exist only to do lots of stuff in one single line of code. You end up with totally impenetrable unreadable perl-esq garbage write-once-read-never code that is too clever for its own good. And people say python is easy to learn and good for beginners...! A better approach would be something like Java Streams/.net Lync/RxX pattern IMO. Explic…
dic = {k: v for k, v in dic.items() if k in other_dic and v == "bar"} How could that be improved? That's 3-4 LOC minimum in any other language My main grip is python's ternary operators, since the True value is evaluated before the condition, if you are doing ternaries on things that might throw exceptions the False value has to come first value = 0 if key not in dic else dic[key] * 5 rather than (throws indexerror i…
dic = dic.where((k, v) => k in other_dic and v == "bar").todict()
Re: Python is not a great programming language
#110These all just seem related to syntax, not actual program structure or capabilities. The only program structure thing I see is list comprehensions, which is one of Python's great strengths. Ironically they say Ruby is more pleasant to write, when Ruby has the deepest structural flaws of any dynamic programming language.