Earlier quoted context omitted.
It's also nicely self-contained, especially if you use a distribution like Anaconda. You don't have to spend hours fighting with the configuration and tooling. It's also very easy to debug and step through code using Spyder, which is similar to MATLAB. It makes it easy for someone who is smart and generally competent with computers to be productive in a short amount of time without first amassing huge amounts of arca…
agreed with all the posts above, the only real letdown for me was always the difficulty to produce standalone executables. I would really love a python equivalent to uberjars or go's build tool.
Python has brought computer programming to a vast new audience
131–140 of 268 posts
Re: Python has brought computer programming to a vast new audience
#132> But in the past 12 months Google users in America have searched for Python more often than for Kim Kardashian, a reality-TV star. This seemed so unlikely that I thought the Economist had incorrectly used the Google Trends comparison tool, but they are right: https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F05z... The gap is even bigger when you consider a worldwide audience (i.e. one less focused on America…
To be fair, a single python dev is going to search for queries about python dozens of times per day. Even the most ardent Kardashian fan is unlikely to search for Kardashians in any volume even close to that.
Re: Python has brought computer programming to a vast new audience
#133Earlier quoted context omitted.
Java, PHP, C#, heck, even JavaScript/ES[6,7]. I feel like Python has a lot of its own ways of doing things, whereas a more idiomatic approach is imho a better way to go. Why the hell in the world would you call a class constructor as __init__? Pretty much every popular OOP language does it either by naming a constructor the same name as the class name or through some form of a `construct` notation. Why `self` and not…
> whereas a more idiomatic approach is imho a better way to go. I don't know what you mean by "idiomatic approach". That phrase, I thought , refers to languages that are highly opinionated about using a specific style -- this philosophy is encoded in Python's philosophy: https://www.python.org/dev/peps/pep-0020/ There should be one-- and preferably only one --obvious way to do it. > Pretty much every popular OOP lang…
C doesn't have classes. pre-ES6 - agreed, but who writes it? I think Perl is a bad example, it's dying and is one of those highly opinionated guys, with all its `method`, `trusts`, etc.
> As for the complaint about the `if __name__ == '__main__':`, to which language are you referring to that has a more self-evident way of encapsulating that functionality?
My gut tells me that this is an error-prone idiom.
I'm not saying Python is bad, I just don't like it. I'd love to know what are the strongest sides of the language though?
Re: Python has brought computer programming to a vast new audience
#134Earlier quoted context omitted.
Other than interfaces and generics (which would make no sense to add in Python, since it's dynamically typed), can you name some OOP features Java has that Python doesn't have?
> can you name some OOP features Java has that Python doesn't have? Encapsulation. In Python you can write code in an OO style and benefit from inheritance, but it’s really only good for people writing libraries and frameworks. For end user code, objects are best avoided because they can pick up state in unexpected ways, which leads to problems that are extremely difficult to debug.
Re: Python has brought computer programming to a vast new audience
#135Read the comments here. Look at the diversity of opinions and the number of them that, while professing love for Python, directly contradict each other. Python is verbose|concise, simple|advanced, disciplined|experimental, modern|classical. It goes to show: something doesn't need to be actually-better. It doesn't need to be actually-simpler. It doesn't need to make your job easier or better. It needs to make people t…
I gather the exact opposite opinion of you: when something is aesthetically pleasing people will come up with rationalizations for why they like it, even if the real reason is difficult to describe. Similar to how in a focus group you can judge people's overall opinion but you should not focus on their specific feedback.
Python's community certainly feels distinct to me in this way.
But this is, of course, subjective. Your mileage may vary.
Re: Python has brought computer programming to a vast new audience
#136Earlier quoted context omitted.
from __future__ import braces I hated the white-space thing until I discovered that. For whatever reason this made me get over myself and learn to love the tab/space argument that is somewhat akin to the vi/emacs argument.
Oh, I see. I use spaces and vim (I do, but who cares). Let's start a flamewar. /s Every time I think about tabs/spaces, I think about that episode in Silicon Valley [1]. Hilariously accurate, I have the exact same feeling when somebody uses the mouse to copy something or navigate. The cringe makes me feel alive (I guess this is the ultimate reason for those flamewars. And neurotic tendencies, of course). [1]: https:/…
:set ts=8 sts=0 sw=8 expandtab
I have secrets.Re: Python has brought computer programming to a vast new audience
#137Earlier quoted context omitted.
What programming environment more deployed? It's surely the case that other binary interpreters are more deployed. But shipped interpreter with free input, a runtime, debugger and (for nearly every implementation, an interactive visual editor).
Office Macros (and the underlying Windows COM interfaces), which include all of those features if you enable it. Bash. Desktops versions of browsers have all those things you listed. Mobile browsers do not. Also only modern-ish desktop browsers have that feature set, for a very long time the predominant browser of the day hardly had any debugging experience worth mentioning, the two I've listed have had them for a lo…
Bash is a good one! But I think windows ships without it. Office Macros are a really good one. Excel is also really good. But I think Windows technically ships without both, whereas the current browser is technically a full on programming environment and has been there since (minimally) IE7, which was a long, long time ago.
Sorry, I did kinda cheat on the way I defined my statement tho.
Re: Python has brought computer programming to a vast new audience
#138Earlier quoted context omitted.
You're referring to duck typing, which to me contradicts the Zen of Python: Explicit is better than implicit . > Slower? Yes, overall the language is slower than PHP. It's not a bad thing, just the result of benchmarks. It doesn't mean one should stop writing Python.
No, I'm not referring to duck typing. An abstract base class enforces the interface. Explicitly. Some benchmarks might be slower, but I don't know anyone doing high-performance computing with PHP. I do see the topic at Python conferences.
Re: Python has brought computer programming to a vast new audience
#139Earlier quoted context omitted.
"However, the slight difference in syntax makes Python dramatically easier to read and write" Please prove it.
The evidence is in the usage. As I said, Javascript decided it was a bad idea, despite its popularity in Python. Your phrasing is a little aggressive, so I'm guessing this is one of those discussions where there's no real chance to change your mind, but I'll give it a shot. Consider one of the most friendly languages, SQL. Python comprehensions follow the same pattern as SQL. SELECT expression FROM table WHERE condit…
It's possible it was not adopted because there's a cost involved in every feature that has inconsistent support across runtime. The benefit needs to outweigh that cost.
> Putting the expression first makes the language more declarative
The case for a specific order makes less sense in a declarative language, not more.
And:
[1,2,3,4].map((x) => x * 2)
Doesn't seem substantially more or less declarative than:
[x * * 2 for x in range(1,5)]
to me. If anything, the latter example asks more of the reader because it requires an awareness of case-specific semantics.
And overall, it's simply never been clear to me what comprehensions buy in terms of readability or semantics over map/reduce/etc, and given JS cultural buy-in on some imported concepts from FP, my guess is that the marginal benefit just didn't seem worth the cost rather than it being a misstep in the specific proposed JS syntax.
Also: SQL has its points, but it's not a language I'd generally describe as easiest. Declarative DSLs tend to be largely convenient only in their domain. It may be worth admitting SQL to this discussion I suppose given the overlap between its domain and map or foreach like concepts, but is it really strictly easier to reason about how to do something this particular thing in it (and what it's actually doing) than either Python or JS? I don't think that's as straightforward an argument as you seem to have assumed.
Re: Python has brought computer programming to a vast new audience
#140Earlier quoted context omitted.
To the contrary, I cannot reconcile your statement about their insularity with the observed behavior. It's almost as if you are wrong in your interpretation. It's easy to prove me wrong - where has van Rossum panned list comprehensions or the new async/await features?
> It's easy to prove me wrong - where has van Rossum panned list comprehensions or the new async/await features? Since I never claimed he did, I struggle to provide offhand examples. See: every discussion about lambdas discredited every day by the existence of a robust self-taught javascript community.
You said Python developers as a whole were insular and as a whole it "prides itself on ignoring things".
I listed three different things which Python obviously got by looking to other languages. This is neither insular nor ignorant.
How do you reconcile your statement with my observation?
You replied with "The very same things the senior community and GVR pan are in fact their bread and butter."
I presumed this had something to do with the three items I listed, since that's how conversations are supposed to work.
Van Rossum has been pushing for async programming since at least Tulip, so it was certainly part of his 'bread&butter'. Thus, async/await are in category of things you claimed that he panned.
Now you say you didn't claim that?
Are you really just so pissed off that van Rossum doesn't like lambda that you want to besmirch the entire Python development community?