Live data from Hacker News

Why People Should Learn Python

iluxonchik.github.io

51–60 of 329 posts

Re: Why People Should Learn Python

#51

Is it just my feeling or are there languages which are preferred on HN? Indicators for languages which are liked by the HN community: - Positive stories get many upvotes and are instantly at the top of HN - Most comments are positive - Frequent coverage on HN about the language Indicators for languages which are not liked by the HN community: - Rants get many upvotes and are instantly at the top of HN - Most comments…

One obvious problem looking at your list is that PHP is ranked so low. This is likely due to the fact that most discussions on this site are not about PHP, but PHP frameworks like Laravel, Symfony, Zend, etc.

Not all - note the always relevant: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Re: Why People Should Learn Python

#52
I use python on daily basis for 5 years now. It's a really cool language, but:

* Packaging is horrible

* Releasing python code is a non-standarised nightmare. Every solution has it's own flaws

* Big and complex projects in python are really hard to reason about

* Poor support for concurrency (fixed in py3)

Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex stuff, I'd recommend something with type checking and better support for release process.

Re: Why People Should Learn Python

#53
> Another thing is strict typing and debugging: since Python is an interpreted language, finding bugs wasn’t as easy

Wait, what? How is its interpreter remotely relevant to its semantics?

> if you have a syntax error in C, the program will simply not compile, on the other hand, in interpreted languages, the problem might go unnoticed for quite some time

Hang on--Python allows you to run code that has syntax errors? I'm so confused.

Re: Why People Should Learn Python

#54

For all its virtues, I feel introductions to Python tiptoe around a very important topic: yes, Python is nice and easy, but you'll have to program the Python way too . Try running a nested loop on a non-trivial example, and you can end up spending minutes in what would take milliseconds in any other language. If you want to program in Python, you must get used to the functional paradigm. Not "should", "must". Now, I'…

> Try running a nested loop on a non-trivial example, and you can end up spending minutes in what would take milliseconds in any other language.

Huh? Can you provide an example? There's nothing about writing nested loops in Python that is qualitatively different from other languages.

> If you want to program in Python, you must get used to the functional paradigm. Not "should", "must".

This is incorrect, much to my chagrin. Python's trend over the past few years has been not only not to encourage functional programming, but to explicitly discourage functional programming. For example, starting in Python 3, `reduce` has been banished from the language proper to the standard library.

Re: Why People Should Learn Python

#55
post #2

Now that I have a chance to ask: I've always found the def __init__ method with 4 (!) underscores one of the ugliest things I've seen in a programming language. Don't get me wrong: I like Python and know it's truly good, but __why__??

"The use of double underscores to indicate "magic" words goes at least as far back as the C preprocessor, which used that convention starting in the 1970s (e.g., __FILE__, __LINE__). It did so because there were no symbols that were off-limits to the preprocessor, so a rarely-used naming pattern (multiple underscores and upper case words) virtually ensured a lack of conflicts." http://programmers.stackexchange.com/a/…

There was a technical reason for C though, the preprocessor is just a bit more than an automatic text replace, in Python it seems it was just a design decision. Also in C those where not words embedded in the language, in python case it is.

Re: Why People Should Learn Python

#56

If you want to learn more in-depth Python: https://pythonspot.com

I just went with the "Fluent Python" O'Reilly book.

http://shop.oreilly.com/product/0636920032519.do

It's a bit pricey, but I managed to score it on a 50% sale, and I have to say I think it's a very good book for people already fluent in other programming languages.

Re: Why People Should Learn Python

#57
post #43

I switched to writing python as my main backend/scripting language with my new job. Previously I was using Ruby for most of this stuff with some Go. I must say that so far Python has been a vastly inferior experience for me. The languages are fairly similar all though I prefer the more talkative/english style of ruby and the use of functions over list and dict comprehension. The thing that really stands out to me tho…

Check out conda sometime.

Re: Why People Should Learn Python

#58

Why you shouldn't learn Python: 1. In-consistant syntax. 2. The language uses exceptions to control flow of logic. 3. Divided community, since Python 3+ included breaking changes to the standard. 4. Un-discoverable APIs. You better hope the documentation is bulletproof else the API could change in any which way during runtime. 5. Poor error messages. If an import goes wrong you are not told why, and so on. 6. Ultimat…

>3. Divided community, since Python 3+ included breaking changes to the standard.

I'm using Python since about half a year and for all I did this wasn't an issue. I just started with 3 and had the feeling everything around me was 3 as well. 3 was released in '08.

Re: Why People Should Learn Python

#59
post #51

Earlier quoted context omitted.

One obvious problem looking at your list is that PHP is ranked so low. This is likely due to the fact that most discussions on this site are not about PHP, but PHP frameworks like Laravel, Symfony, Zend, etc.

Not all - note the always relevant: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Nobody said all.. and your link is just some guy's rant. He mentions at the end that he doesn't have any conclusions and he just assumes that people who read the article agree with him.

Sure, PHP has it's faults, but as your article points out, it's designed to give people who aren't full time programmers tools with which to build websites or scripts to perform tasks, and there is a large market for that sort of thing.

Re: Why People Should Learn Python

#60
post #43

I switched to writing python as my main backend/scripting language with my new job. Previously I was using Ruby for most of this stuff with some Go. I must say that so far Python has been a vastly inferior experience for me. The languages are fairly similar all though I prefer the more talkative/english style of ruby and the use of functions over list and dict comprehension. The thing that really stands out to me tho…

"There seems to be fewer nice libraries and they seem to be spread across the web whereas Ruby centralises around GitHub. I also find that Python libraries have lacking or hard to find documentation in many cases."

Could you clarify a bit more on this with the real world examples ?

Post reply on HN