News for hackers. Stuff that matters.
Re:Why People Should Learn Python by greenspot on Wednesday August 24, 2016 @05:09AM (#12350694)
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 are negative about the language

- Rare coverage on HN

Applying those indicators, following languages should have these like-levels (on a range from 1 to 5):

  Python  *****
  Go      ****
  Node.js *
  C#/.NET ***
  Java    ***
  RoR     **
  Ruby    ***
  Elixir  ***
  Haskell ****
  Closure ***
  C       ****
  Rust    *****
  C++     ***
  PHP     *
  Swift   ****
  
This is just my feeling, happy to hear your perception. And this does not reflect my opinion about those languages in any way.
Re:Why People Should Learn Python by dismantlethesun on Wednesday August 24, 2016 @05:50AM (#12350807)
At a glance, it looks like all languages are reasonably well loved except PHP and Node.js (shouldn't this just be Javascript? Does having a different standard lib make it a different language?)

I think that's due to people having flash backs to terribly written code in both languages.

For example, PHP apps pre-2005 rarely if ever used frontend controllers, preferring instead to twine in configuration and helper functions into isolated pages that were directly served by Apache. This meant that there was no single obvious place to put things like caching.

Additionally, once upon a time, PHP didn't really have well developed ORMS, so everyone just wrote queries and hopefully parameterised queries---but not always. So if you had a hobby project that took off, then within 3 years it'd be a roiling ball of mud where it's difficult to do basic things like tracing which calls happen per page.

PHP came to prominence early in the web, and it was easy to use so everyone had a hobby project that took off, or had to work within something like that. Hence the hate.

To compare it to Javascript, I think the disdain for both languages is due to their initial nature---they were both written over an short period of time, and evolved in spurts rather than being carefully designed from day one or designed to overcome the shortcomings of another language.

The quality of the above really shows up in the inconsistency of the standard libraries, and the fact that certain semantics were inconsistent or danger zones in practice but couldn't be changed.

---

I do remember though when everyone hated C, and loved C++, then went back to loving C... so maybe programmers are just fickle and none of what I said makes sense. :)

Re:Why People Should Learn Python by TeMPOraL on Wednesday August 24, 2016 @07:40AM (#12351264)
With PHP, I'll agree, though with JS I think it's the reverse. At least my personal dislike for the language and the ecosystem grows with every new hot framework, build system, or other weird "must-have" link for the toolchain that Node people seem to create almost daily.
Re:Why People Should Learn Python by nilliams on Wednesday August 24, 2016 @02:24PM (#12354151)
The JS community is considerably larger than all other programming communities, and better at promoting (and documenting) its tools/libraries/frameworks (a lot of these tools come with beautiful landing pages, docs and demos).

That shouldn't be seen as a mark against the technology. Nobody is forcing you to switch tools.

Re:Why People Should Learn Python by throway21312 on Wednesday August 24, 2016 @03:13PM (#12354490)
> That shouldn't be seen as a mark against the technology. Nobody is forcing you to switch tools.

Except when they do because they're the front end team. :P

Re:Why People Should Learn Python by nilliams on Wednesday August 24, 2016 @03:44PM (#12354687)
Well you should really have that out with them! If you feel they're needlessly switching and putting your project at risk, have them justify it.

(Or just have a rule that as a team you try e.g. '1 new thing' per project).

Again this shouldn't be a reason to hate on the JS community.

Re:Why People Should Learn Python by FilterSweep on Wednesday August 24, 2016 @10:02AM (#12352064)
I have to agree.

As a hobbyist Node developer (day job is not in Node), I find it hard to talk with other Node developers as there is some build-tool or even full framework that sits on top of Express that I "should" be using but I'm not. But maybe it's just me.

Re:Why People Should Learn Python by cel1ne on Wednesday August 24, 2016 @09:11AM (#12351717)
> Node.js (shouldn't this just be Javascript? Does having a different standard lib make it a different language?)

I think the dislike comes from the idea that JavaScript-development can be or at least was very messy and that "the JS-people" now try to carry that over to the server-side.

npm also has many issues and node as a server-side VM wasn't very dev-ops friendly in the beginning, if I'm not mistaken.

Note: This doesn't mean I don't like JS or node, I use them daily, though I have never used a production node-server. I'd rather run my JS on the JVM.

Re:Why People Should Learn Python by kayoone on Wednesday August 24, 2016 @06:40AM (#12351009)
just to chime in on this, modern PHP is nothing like what people remember from the pre ROR days, i still use it to this day and the major frameworks and libs are really well written to the point i feel some are even over engineered and almost looking like Java (just take a look at the latest Guzzle PHP Library)
Re:Why People Should Learn Python by collyw on Wednesday August 24, 2016 @07:19AM (#12351168)
As my PHP fluent colleague said to me - don't bother learning PHP or you will end up having to fix (our) Wordpress sites and thats a nightmare. We have a Python application, and while its not written well, the PHP sites we have seem to be a fair bit worse even the ones not done in Wordpress.
Re:Why People Should Learn Python by dreistdreist on Wednesday August 24, 2016 @07:27AM (#12351211)
Wordpress is horrible. Never going to touch that again (Senior PHP Dev myself) or anything else like it (Magento, Drupal,...).

And yes there is a lot of horrible PHP code out there, writting by bad developers. I guess newer or not as accessible languages don't have as many bad devs as PHP/JS.

But if you have good devs, I prefer a good PHP codebase to any other language that I have come across (I tried a lot of them).

Re:Why People Should Learn Python by TheLarch on Wednesday August 24, 2016 @10:54AM (#12352462)
Around 2001 I felt jaded with the industry and determined to do whatever was expedient to earn money. That meant using PHP, because that was purportedly the place to be at the time.

I have never felt so uninspired by a language. My overwhelming feeling from the get-go was that it was a collection of libraries, which would be fine -- but why create a new language?

PHP has the rare distinction among languages of not containing any novel features or ideas. Not only that, but it borrows liberally from several other languages, resulting in an overabundance of syntax. Instead of a tool for attacking problems, it's a reheated leftover. There is not suggestion of a better or worse way to accomplish some goal.

Finally, the original premise of PHP, interspersed functional code and HTML, is high on my list of really bad ideas. Code written in this style is doubly-challenged in terms of reuse and maintainability. Again, there is again no semblance of better or worse with this approach. If you had Richard Stallman and Linus Torvalds produce the same website with PHP, there would be very little in common between their approaches.

Given the success of Facebook et al, I presume that the interspersed code/html thing has been superseded, and further that the egregious security issues in PHP have been fixed. But the picture in my mind's eye is something that lumbers along despite its thorough mediocrity. I will allow that making PHP adequately consistent and secure are impressive feats.

Sincere question: how am I wrong here?

====== edit ====== Drop extra 'the'

Re:Why People Should Learn Python by jdhawk on Wednesday August 24, 2016 @11:09AM (#12352580)
Since when did something need to have novel features or ideas in order to be productive?

I'll counter that one of the main reasons PHP became such a used language (other than ease of deploy) is exactly the reasons you dislike it. There are multiple ways to do things - that coincide with the ways you do things in many other languages (which it steals from).

You dont have to learn anything radically new to use it, and that makes it very easy to do things quickly.

Re:Why People Should Learn Python by TheLarch on Wednesday August 24, 2016 @11:28AM (#12352723)
"Since when did something need to have novel features or ideas in order to be productive?"

It doesn't. But if your language ideas are admittedly no better than the next guy's, what's the point?

Re:Why People Should Learn Python by jdhawk on Wednesday August 24, 2016 @12:22PM (#12353144)
It's easy, fast (both Development speed and Page Views), and can deploy anywhere with a few clicks? It has no novel concepts that require learning something new. It has a plethora of existing code, documentation, frameworks, and StackOverflow answers to solve almost any problem (albeit, not always correctly).

Its the lowest barrier to entry web language - and honestly, I'm ok with people writing shit PHP. It gets good Ideas out there quickly - allowing the business to grow without a focus on the Development. This creates opportunities for sharp developers to come in and work on proven ideas.

Re:Why People Should Learn Python by dreistdreist on Wednesday August 24, 2016 @12:07PM (#12353017)
It can be a combination of different things that exist somewhere but not in this combination.

For me PHP is like Java but with sane nullability. It's like python but it actually has interfaces so that I can do proper OOP.

Re:Why People Should Learn Python by Shorel on Wednesday August 24, 2016 @12:29PM (#12353205)
Currently, with version 7.0, its implementation is faster than most other scripting languages.

That's one big important point.

Re:Why People Should Learn Python by dreistdreist on Wednesday August 24, 2016 @12:06PM (#12353008)
2001 was 15 years ago. PHP looks completely different now. It looks very much like Java with -> instead of dots and a few differences.

Nobody sanes mixes HTML and PHP code anymore these days. Most people are using Twig for templating or at least something similar. Everything (decent) is object oriented these days.

So your views were correct 15 years ago, but have a look with fresh eyes and you will see something completely different.

Re:Why People Should Learn Python by mtberatwork on Wednesday August 24, 2016 @12:31PM (#12353218)
Not disagreeing with you, the "javafication" of PHP has been going on for a while now (for better or for worse), but pluck your average person using PHP out from a crowd and they are still writing code like it's 2001.
Re:Why People Should Learn Python by dreistdreist on Wednesday August 24, 2016 @01:26PM (#12353640)
If you pick an average person, then yes maybe. But that's because it's so widely used by non-developers.

But if you narrow that down to actual developers who have a job working on a product, not someone hacking a wordpress template, then it will look much different.

Not saying the average PHP developer is great at OOP, but at least things are moving into that direction. And the code quality has come very far since 2001, just look at at current open source libraries (see packagist.org) and compare them to old PHP code.

Re:Why People Should Learn Python by chias on Wednesday August 24, 2016 @11:17AM (#12352641)
> I have never felt so uninspired by a language.

I agree with this sentiment very strongly. I understand that there's a lot of hate, flamebait, etc etc about the language, with which from my own experience I agree with or disagree with in fairly equal parts. At this stage, I have written more large web projects in PHP than any other language (for varying reasons). I don't proselytize on why it is (or is not) a good language. But for me, personally, a huge chunk of whether I'm happy or not comes from whether I feel inspired while I'm working. Quite separate from the excitement of solving problems: while working with Rust or Python, I get excited, and am generally happy (even when fighting with Rust's compiler); while working with PHP, I tend to feel vaguely annoyed. Take from that what you will.

I'm of the opinion that the best tool for the job is the one you know how to use, and in the real world of deadlines and opportunity cost, if you get a great PHP dev to write your application in Python it's going to be far more expensive and far worse than if it had been written in PHP. But it's also going to be far less fun to both write and maintain. I think you have to make your language decision depending on your priorities.

> the egregious security issues in PHP have been fixed

This I strongly disagree with. And I don't think it's possible. It's not that the existence of the language includes vulnerabilities, it just makes it extremely difficult to write applications securely. I actually teach an upper-division university class on Network and Application Security, I am writing my PhD dissertation on the topic. I have worked on the internal security team of a very large company, and I have worked as a penetration tester / security auditor. I am very familiar with the vulnerabilities that plague web applications. And I still occasionally find the odd XSS vulnerability, timing concurrency attack, etc. in PHP code that I myself have written. And most PHP applications are not written by people with my background.

Re:Why People Should Learn Python by TheLarch on Wednesday August 24, 2016 @11:46AM (#12352862)
"while working with PHP, I tend to feel vaguely annoyed"

Exactly! I was never satisfied with my PHP code, as there does not seem to be a better and worse answer in many cases.

For the record I did not mean to assert that PHP has become secure, I meant that I presumed it had. Some years ago it was a laughingstock on Bugtraq.

Thanks for the feedback!

Re:Why People Should Learn Python by gremlinsinc on Wednesday August 24, 2016 @08:20PM (#12356161)
Have you tried working with Laravel 5.2+ ? Instead of doing tons of for-loops, etc..

You can easily create a collection from data and process it. For example using the DB class to get data returns an array of Std objects.

For a legacy app I'm working w/ --it needs to be an array of arrays... I could for loop, and then add each to a new array.. or I can simply do:

$data = DB::table('something')->where('something')->get();

return collect($data)->map(function($x) { return (array) $x });

There's a talk at lara-con on using collections to replace just about all loops, and it's pretty insightful and makes code so much more readable and enjoyable.

PHP by itself can be ugly -- but the Laravel community has created something beautiful from what used to be akin to horse shit.

Re:Why People Should Learn Python by dreistdreist on Thursday August 25, 2016 @02:53AM (#12357309)
Laravel is still horse shit that does not follow good OOP practices.

Static calls and active record are not good OOP. Neither are Std objects.

Have a look at doctrine if you need an ORM. Otherwise read up on DDD and SOLID.

Re:Why People Should Learn Python by whatnotests on Wednesday August 24, 2016 @11:24AM (#12352696)
Ten points for the reheated leftover bit.
Re:Why People Should Learn Python by gremlinsinc on Wednesday August 24, 2016 @08:14PM (#12356146)
I'm a php dev, and as much as I try going to Rails/Django -- I keep coming back to Laravel. W/ Laravel + composer PHP finally grew up, wordpress is a hacky out-dated should-be-shot-and-replaced beast. The best way of modern web dev in my opinion is to use Vue or Angular for the frontend, and laravel as a backend. PHP 7.0 is extremely fast and proficient, and it's an easy framework to pick up.

If you need anything more resilient server side then I'd recommend using a Golang or Elixir framework like Phoenix which has multi-threading.

Re:Why People Should Learn Python by pthreadses on Wednesday August 24, 2016 @08:01AM (#12351359)
Could you elaborate a bit on what you prefer about it? I've heard this from a few people and would be curious to hear it fleshed out a bit.
Re:Why People Should Learn Python by dreistdreist on Wednesday August 24, 2016 @12:02PM (#12352978)
It has most of the OOP things that I want in a language (interfaces for one, looking at you python), few things still missing but hopefully coming soon (generics, nullable typehints). And it has sane nulls in my opinion, compared to Java at least.

In the end good PHP code ends up looking like good Java code I think. But you don't have to worry about everything being nullable.

But then horrible PHP code is something else... Luckily I don't really have to touch that very often.

Re:Why People Should Learn Python by busterarm on Wednesday August 24, 2016 @10:14AM (#12352147)
> As my PHP fluent colleague said to me - don't bother learning PHP or you will end up having to fix (our) Wordpress sites and thats a nightmare.

This is my life right now... lol

It's not so bad, but the frustrating part is when I talk to people in interviews about all of the great work I'm doing modernizing (the surrounding) WordPress infrastructure and the tools I've built for it, their eyes just glaze over.

I frequently get told "you're a talented developer and you're wasting your time working at X". Well, at least at my job I get to remove technical debt constantly. I don't feel like that's the case at these places I'm interviewing.

Re:Why People Should Learn Python by arenaninja on Wednesday August 24, 2016 @09:46AM (#12351926)
Which is a shame. I recently started toying with C#, and most of the syntax is eerily similar to PHP7. Obviously the standard library is completely different, but so far I'm right at home with the core language (though I haven't explored more advanced features yet).

Luckily I'm currently working with a PHP7 app, so all is good, but my next app will likely not be PHP at all.

Re:Why People Should Learn Python by Practicality on Wednesday August 24, 2016 @10:50AM (#12352437)
This is true, it seems like the different languages are starting to converge. C# and Java are converging as well. There are still major differences, but it's getting to be like bickering siblings rather than comparing unrelated strangers.
Re:Why People Should Learn Python by dismantlethesun on Thursday August 25, 2016 @12:00PM (#12360095)
> over engineered and almost looking like Java (just take a look at the latest Guzzle PHP Library)

Guzzle doesn't look that bad. It looks like requests from Python, but you have to create a client first.

> $client = new Client(['base_uri' => 'http://httpbin.org']); > $response = $client->get('http://httpbin.org/get');

Or in Python

> response = requests.get('http://httpbin.org/get')

Re:Why People Should Learn Python by SmellTheGlove on Wednesday August 24, 2016 @11:20AM (#12352664)
My day job is no longer to write code, but I have a couple of projects I work on at night, so take my opinion for what it's worth. I have one project that's mostly static content and a couple of calculator forms. On submit, I an ajax call to post to a PHP script, it returns a json object with some data, and I display it. When I see PHP getting ripped, I always wonder, what am I supposed to use if not this? I know this is relatively simple, but my choices were to do the calculations in javascript or let PHP handle it - and PHP seemed to me as the right choice because I eventually may want to capture some of the input data, send it to a db, etc.
Re:Why People Should Learn Python by mod on Wednesday August 24, 2016 @12:23PM (#12353151)
Basically any other backend is equivalent. Javascript (on the backend), python, ruby, anything.

Not a knock on php on my part, PHP is equally suited.

I would have personally probably chosen Flask (python).

Re:Why People Should Learn Python by sotojuan on Wednesday August 24, 2016 @08:33AM (#12351515)
My understanding is that the majority of PHP jobs out there are maintaining old, outdated, and bad codebases using an old version of PHP so a lot of people just don't bother.
Re:Why People Should Learn Python by levelist_com on Wednesday August 24, 2016 @10:16AM (#12352167)
There is probably some truth to this. Every single contract I have been offered in the past 2 years including the one I am currently working required PHP5.6 & 7 knowledge, git, composer, JS, the latest JS frameworks, etc. Start the job... PHP5.3 codebase w/ some old jQuery. Its an absolute nightmare. I have to go home at night and write in PHP7 just to maintain some level of sanity or I'd have to cry myself to sleep. The only thing that makes the job tolerable is that I was able to load xdebug on the dev environments (though it doesn't always work b/c of all the redirects - it still is good enough to get me 90% of the way there).
Re:Why People Should Learn Python by tim333 on Wednesday August 24, 2016 @08:57AM (#12351648)
There have been surveys if a bit out of date:

Poll: What's Your Favorite Programming Language? (2012) https://news.ycombinator.com/item?id=3746692

Poll: What's Your Most Disliked Programming Language? https://news.ycombinator.com/item?id=3748961

https://i.imgur.com/toGKy21.jpg

Re:Why People Should Learn Python by nhumrich on Wednesday August 24, 2016 @09:20AM (#12351780)
Someone should start another "what's your favorite language" poll. A lot of currently popular languages weren't even on the 2012 poll at all, (like golang)
Re:Why People Should Learn Python by rezashirazian on Wednesday August 24, 2016 @03:26PM (#12354569)
Swift wasn't even released back then
Re:Why People Should Learn Python by galfarragem on Wednesday August 24, 2016 @10:26AM (#12352257)
Ordering languages and frameworks by amount of 'love' (edited with small adjustments):

  ***** Python, Rust, Lisp
  ****' Go, Swift, C, PostgreSQL
  ****  Elm, Elixir, Typescript, Haskell, OCaml, JS-ES6, Kotlin, Crystal
  ***'  Scala, Lua, Clojure, Erlang
  ***   C#/.NET, Java, C++, Ruby, JS-ES5, MySQL
  **    Node JS, RoR, Meteor, MongoDB
  *     PHP, VBasic, Cobol, Coffeescript
Re:Why People Should Learn Python by rz2k on Wednesday August 24, 2016 @11:27AM (#12352712)
I might rank the love for Elixir higher. Go has a lot of detractors, in addition to the people who are getting a lot done with it. Comments often seem to think Haskell or its community is a little ridiculous. Lua always gets positive comments, maybe a 3.5.

If we're including MySQL and PostgreSQL, SQLite should be way up there based on the universally positive comments. MongoDB might be ranked too high at 2, though people have begun to acknowledge that was because they tried to use it for the wrong task.

Re:Why People Should Learn Python by dccoolgai on Wednesday August 24, 2016 @03:42PM (#12354673)
Add:

* * * * * WASM

Dare to question the pragmatics of diverging web dev practices into a whole new realm of complexity and drown in downvotes - and a litany of people being downright personally insulting/condescending. This is sort of a corollary to JS being * (I think you ranked ES6 too high) and I've been inured to people hating/ranting against JS to a point - but even I was shocked by the personal rancor that oozes out if you try to have an objective discussion about whether the web really needs one more language.

Re:Why People Should Learn Python by galfarragem on Wednesday August 24, 2016 @04:17PM (#12354915)
I agree, it would be more reasonable to rank JS-ES6 and Kotlin with 3.5* instead of 4. And Go with 4* instead of 4.5*.
Re:Why People Should Learn Python by coredog64 on Wednesday August 24, 2016 @11:56AM (#12352938)
If PG gets 4 stars, I'd put MySQL at 2 or 3 based on all the comments that show up in MySQL stories: "Why didn't they use feature X in PG?" "MySQL kicked my dog and cheated with my significant other", etc.
Re:Why People Should Learn Python by funkyy on Wednesday August 24, 2016 @05:31AM (#12350757)
But you writing this as a bad thing? It's normal for a community to pick tools/solutions that are preferable.

A lot of HN users are for example startup owners/creators so it's normal that they will prefer easy and semi-automated language like Python.

Re:Why People Should Learn Python by pawadu on Wednesday August 24, 2016 @07:36AM (#12351250)
It would be interesting to hear from people maintaining code that came from these startups. I suspect they would have a very very different view of things :)

Maybe something investors should think about? Ehh, who am I kidding...

Re:Why People Should Learn Python by funkyy on Wednesday August 24, 2016 @05:30PM (#12355397)
This simple code and more time on hands to spend on promoting = successful startup. No one really cares about scaling YT-like app when it has 10 users.

Developers will handle that. And if they want jobs, startups must be made. As you might know, successful startups are made by less technical people mostly...

Re:Why People Should Learn Python by 2T1Qka0rEiPr on Wednesday August 24, 2016 @06:44AM (#12351017)
Maybe all your C#/.NET/Java devs can't access HN because their big enterprise businesses have security policies which have blacklisted it? Hah.
Re:Why People Should Learn Python by finnjohnsen2 on Wednesday August 24, 2016 @07:10AM (#12351123)
.NET/Java is to pay the bills, and we vote for the fun stuff while we create our boiler plate classes.
Re:Why People Should Learn Python by jcadam on Wednesday August 24, 2016 @10:41AM (#12352377)
Exactly. My fun language at the moment is Clojure... I think several years of Java development has made me seriously hate OOP.
Re:Why People Should Learn Python by flexie on Wednesday August 24, 2016 @06:36AM (#12350994)
I would say that node.js is very liked on HN. Half the stories here are about Node.js.

But I rarely see any positive mentioning on HN about c#, .NET, C++ or Java.

Re:Why People Should Learn Python by gjm11 on Wednesday August 24, 2016 @06:53AM (#12351053)
> Half the stories here are about Node.js.

I think that might be a slight exaggeration. At present, zero of the stories on the HN front page appear to be about Node.js.

Re:Why People Should Learn Python by JustSomeNobody on Wednesday August 24, 2016 @08:28AM (#12351494)
My last ten coin flips were heads, but overall, heads is roughly half.
Re:Why People Should Learn Python by gjm11 on Wednesday August 24, 2016 @06:02PM (#12355606)
The HN front page is 30 items. Of those, none were about Node.js when I made that comment. Right now, none are about Node.js and, though I don't trust my memory much, it's a largely different selection of items.

If half of all HN front page items were about Node.js on average, the probability of getting (let's say, conservatively) 40 with none about Node.js would be (1/2)^40 or about 10^-12.

Of course people exaggerate and I am fallible. If 30% of all HN front page items are about Node.js on average, the probability of getting at most one such item out of 40 is about 10^-5. Which is, y'know, still much less likely than ten consecutive heads when flipping a coin.

Re:Why People Should Learn Python by douche on Wednesday August 24, 2016 @06:46AM (#12351027)
Those are the unsexy, but get-shit-done languages. I would hazard a guess that most people are familiar with them, and either are currently, or have in the past, used them for their day jobs. But they are on the plateau of productivity, rather than the peak of inflated expectations or trough of disillusionment, to use the Gartner model.
Re:Why People Should Learn Python by collyw on Wednesday August 24, 2016 @07:20AM (#12351174)
MS languages are used a lot more in large corporate style environments, while HN is startup focused where people are using open source more.
Re:Why People Should Learn Python by neverminder on Wednesday August 24, 2016 @07:37AM (#12351252)
Rust should then get 6 stars judging from unparalleled excitement every news about it brings here. Rightfully so in my opinion. By the way, it's "Clojure", not "Closure" and what happened to Scala?
Re:Why People Should Learn Python by agentgt on Wednesday August 24, 2016 @09:36AM (#12351875)
I have actually wondered that myself (Scala). I was so excited about Scala years ago (2006). One of my TAs from college was working on the language as well. It finally looked like an OCaml for the masses.

Over time my excitement changed. I assume others may share my thoughts hence the less excitement:

* It is on the JVM and there are lots of languages on the JVM competing with Java.

* While the fusion OOP + FP fusion is interesting I have grown wary of kitchen sink languages. There are so many ways people write Scala. Scala from one project looks vastly different.

* The endless DSLs

* Java 8 is often good enough. Particularly for interop and community support.

* Every time I have to add Scala to a Java project I'm thinking here comes 9MB jar that some classpath scanning thing is going to take its sweet time on (Spring, Servlet 3.0, etc).

But I think most of the reason is Rust has filled that hard core typers niche with the added novelty of unique memory management and competing with other LLVM languages instead of JVM languages. Scala has become "old" like Java and OCaml :) .

Re:Why People Should Learn Python by premium-concern on Wednesday August 24, 2016 @10:07AM (#12352096)
I kind of wonder how these points are true today vs. 10 years ago ...

* It also compiles to Scala.js (it's actually the independent best compile-to-JS language out there in terms of libraries, tooling and IDE support). Support for compiling directly to native is coming around nicely.

* Scala is quite far away from the kitchen sink, and many of the questionable parts have been deprecated and/or removed.

* I have never seen much DSLs while writing Scala. Sure, it's probably quite nice, but I have rarely seen endless DSLs in practice.

* The jar is around 4MB (2.12) and when writing idiomatic Scala (~ not Spring/Servlet) there shouldn't be any kind of reflection or classpath scanning happening.

Re:Why People Should Learn Python by agentgt on Wednesday August 24, 2016 @10:57AM (#12352489)
Hmm I guess they have been actively shrinking the jar (it isn't 4 megs but ~5.5... still a massive improvement [1]).

As far as kitchen sink I'm still not sure what idiomatic Scala is especially with the likes of Scalaz. Maybe modern Scala is finally abandoning the OOP fusion.

Of course my biggest reason of not liking Scala is completely arbitrary and almost illogical (of course most reasons to (dis)favor things are arbitrary). If I write in an FP language I hate using curly braces. I prefer Haskell, OCaml, and even Lisp syntax for FP. For some reason curly braces makes me think hmm imperative shit. Not to mention Scala has lots of scoping and closure use so you see lots of curly braces.

And that brings me to another point. Scala code isn't really that much more compact (lines of code or even compressed size) to Java 8 (compared to Haskell or OCaml).

[1]: https://mvnrepository.com/artifact/org.scala-lang/scala-libr...

Re:Why People Should Learn Python by premium-concern on Wednesday August 24, 2016 @01:38PM (#12353746)
Maven Central says it's around 4.4MB (with some things still pending to be dropped before the release of the final version)[1].

[1] https://mvnrepository.com/artifact/org.scala-lang/scala-libr...

I would disagree with the comment on verbosity compared to Java 8/Haskell/Ocaml. Most of the things I do regularly in Scala would require a magnitude of more code. Ocaml doesn't even have higher-kinded types or implicits, so I don't think it can win much on that front (except of saving a line where Scala's curly brace might be). With Haskell it really depends. There are certainly ways to write much more succinct code, but what I see in practice is that it's not that much different from Scala. Haskell has it's own unsolved issues though: broken typeclasses, lacking module system, poor tooling, and a weekly-changing, terrible dependency management.

Re:Why People Should Learn Python by agentgt on Wednesday August 24, 2016 @04:09PM (#12354846)
I'm not sure I like implicits as for HKT... "with great power comes...".

HKTs are great for a generic library writer (aka standard library) but I think the over abstract nature ends up confusing your average developer. You basically have your type aficionados obfuscating the codebase for developers who can barely handle generics. It is sort of analogous to using massive reflection / meta-programming in scripting language (albeit far more safe).

Being extremely implicit and abstract comes with a cognitive load.

OCaml's Functors (ie super strict and explicit) on the other hand can get massively repetitive.

I vaguely remember HKTs being expensive compile time. Is that still the case?

Re:Why People Should Learn Python by lmm on Friday August 26, 2016 @07:23AM (#12365466)
> I'm not sure I like implicits

I think they're a necessary evil. I need extension methods, ad-hoc polymorphism, and a way to use ad-hoc polymorphism while still writing nice DSLs (i.e. what spray calls the magnet pattern). I'm nervous about implicits, but I haven't seen a better solution.

> HKTs are great for a generic library writer (aka standard library) but I think the over abstract nature ends up confusing your average developer.

There are few things more frustrating than having to copy-paste because your language can't handle the abstraction. There are less cases where you need HKTs than where you need basic generics, sure, but sooner or later you do need them. And since everyone hates copy-paste, they end up using annotations or reflection or string-based templating to generate code, all of which end up more confusing to the average developer. At least with HKTs you still have ordinary values that follow the rules of the language, rather than wondering whether you can still factor out a common method because it's called from an annotated method and an unannotated method, and what annotations you need to put on it to make that work.

> I vaguely remember HKTs being expensive compile time. Is that still the case?

HKTs per se are not expensive. Type inference in the presence of HKTs can be expensive (though note that even in OCaml or pure ML there are pathological cases for type inference - http://cs.stackexchange.com/questions/6617/concise-example-o... ). Scala implicit resolution can be expensive especially when used with recursion; global-uniqueness constraints a la Haskell typeclasses would be one solution, but arguably introduce more trouble than they're worth. One way or another, Scala compilation ends up being pretty slow, which is unfortunate.

Re:Why People Should Learn Python by premium-concern on Wednesday August 24, 2016 @08:16PM (#12356153)
The great about types in Scala is that complex solutions to complex problems can be contained and don't infect the rest of the codebase.

The average programmer can enjoy completely consistent names and signatures across different libraries, without having to know that the consistency comes from one method being applicable to various types, not manual labor repetitiously adding the same method to different types which can drift apart at any time without anyone noticing.

HKTs are not that expensive. Slow compile times are usually caused by people doing Prolog at the typelevel in Scala.

Re:Why People Should Learn Python by lmm on Wednesday August 24, 2016 @10:25AM (#12352249)
I think Scala's still growing - I think OCaml is too. I'm worried that between Dotty and the focus on Java 8 support in 2.12, we've gone far too long without improvements to Scala syntax, or indeed a new release at all. Having written Scala professionally full-time for 4+ years I couldn't stand to go back to a language without higher-kinded types, which pretty much means I'm stuck on Scala or Haskell.
Re:Why People Should Learn Python by lmm on Wednesday August 24, 2016 @05:35AM (#12350766)
HN has language preferences, sure. Of course it does - people have language preferences, and some languages really are better than others - no wonder our aggregate likes some languages more than others. I don't agree with every specific of your star-rating, and a more objective measure would probably be more useful (I'm sure I've seen charts of which topics are popular or not on HN), but of course HN has preferences. Why wouldn't it?
Re:Why People Should Learn Python by passiveincomelg on Wednesday August 24, 2016 @06:21AM (#12350941)
Interesting that you rate RoR lower than Java and .NET. My perception is that there is a lot of bashing of the latter two. Personally I do like Python, Rust and Go and I'm curious about Swift. So there's one "data" point. :)
Re:Why People Should Learn Python by blakeyrat on Wednesday August 24, 2016 @03:39PM (#12354655)
Any bashing of C# is always because "Micro$loth" was involved with it, very rarely is it criticized on its actual features or tools. (And when it is, the criticism is usually something like, "it's too much like Java", which I don't personally see as very damning.)
Re:Why People Should Learn Python by rplnt on Wednesday August 24, 2016 @06:29AM (#12350969)
Javscript (I assume you mean) just one star? Then why 90% of the projects on the frontpage are js-based?
Re:Why People Should Learn Python by AhtiK on Wednesday August 24, 2016 @05:19AM (#12350727)
Node.js is a JavaScript runtime, not a language. Used for server-side JavaScript and web frontend build pipeline.

Replacing Node.js with JavaScript doesn't help either as the frontend vs server-side vs npm ecosystem vs es2015 becomes a loaded question .)

Re:Why People Should Learn Python by amelius on Wednesday August 24, 2016 @09:57AM (#12352026)
You forgot one:

    Lisp    *****
Re:Why People Should Learn Python by mickmock on Wednesday August 24, 2016 @09:48AM (#12351938)
This is so true. I often think that people only need to put the word 'Rust' into the title to get a ton of up votes. Maybe because rust is a great game as well as being a popular programming language ;)
Re:Why People Should Learn Python by brightball on Wednesday August 24, 2016 @08:17AM (#12351437)
Elixir is exciting because it's making the amazing world of Erlang accessible to mere mortals with a developer experience on par with Ruby.
Re:Why People Should Learn Python by xiaoma on Wednesday August 24, 2016 @04:40PM (#12355091)
That's close to my perception. If you gave one of Python's stars to Ruby and RoR, gave two of Go's to Elixir and created an entry for Lisp with six stars, it would be pretty much exactly what I'd estimated from this site.
Re:Why People Should Learn Python by jgord on Wednesday August 24, 2016 @12:03PM (#12352989)
Surely measurable ? perhaps github stats are indicative - http://githut.info/

Anecdotally I would have expected Javascript to be near the top of hours being used.

Re:Why People Should Learn Python by z3t4 on Wednesday August 24, 2016 @05:50AM (#12350809)
What I find interesting is that we are so quick to follow new trends.
Re:Why People Should Learn Python by frogfuzion on Wednesday August 24, 2016 @07:07AM (#12351110)
Isn't there a psychological aspect to this - that if you are on the cutting edge of languages/frameworks, that you believe you will have an edge over everyone else and a chance to be better for a period of time at least? This is of course typically ignores whether the cutting edge can actually solve problems better than mature languages/frameworks.
Re:Why People Should Learn Python by JustSomeNobody on Wednesday August 24, 2016 @11:08AM (#12352576)
Psychology or survival? How much demand is there for someone who's maintained an MFC app for the past 20 years?

This person could ROCK at C++, but who's going to look at his resume and give him an interview?

Re:Why People Should Learn Python by z3t4 on Wednesday August 24, 2016 @07:20AM (#12351173)
Psychology is a very broad area. We all want to be part of something, a community or culture, especially one witch is highly regarded among our peers.
Re:Why People Should Learn Python by JustSomeNobody on Wednesday August 24, 2016 @11:06AM (#12352553)
While I generally agree with you, I'm not sure Python is a new trend.
Re:Why People Should Learn Python by mark-r on Wednesday August 24, 2016 @12:00PM (#12352963)
I had an opportunity to learn Python around 1996, and I passed. When I came across it again in 2003 I tried it, then kicked myself for not jumping on the bandwagon earlier.
Re:Why People Should Learn Python by blakeyrat on Wednesday August 24, 2016 @03:40PM (#12354658)
1) Speak for yourself 2) Python's from 1995
Re:Why People Should Learn Python by sotojuan on Wednesday August 24, 2016 @08:34AM (#12351521)
And in /r/programming, anything that isn't Python, C, C++, C#, Java, Rust, and sometimes Haskell gets hated on and labeled as "hipster" and terrible.
Re:Why People Should Learn Python by FabHK on Wednesday August 24, 2016 @01:45PM (#12353804)

    Julia *****
(or maybe that's just my opinion :-)
Re:Why People Should Learn Python by rando444 on Wednesday August 24, 2016 @06:01AM (#12350856)
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.
Re:Why People Should Learn Python by d33 on Wednesday August 24, 2016 @06:04AM (#12350868)
Re:Why People Should Learn Python by rando444 on Wednesday August 24, 2016 @06:16AM (#12350924)
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 by bottled_poe on Wednesday August 24, 2016 @08:13AM (#12351418)
> it's designed to give people who aren't full time programmers tools with which to build websites

And just like that, the cyber-security profession was born.

Re:Why People Should Learn Python by jrcii on Wednesday August 24, 2016 @09:00AM (#12351659)
That's not necessarily relevant. It's been rebutted point by point http://forums.devshed.com/php-development-5/php-fractal-bad-..., and PHP has undergone major changes since that was written.
Re:Why People Should Learn Python by Hasu on Thursday August 25, 2016 @12:11AM (#12356935)
That PHP has gone through major changes matters, and I agree that newer versions of PHP are huge improvements, but I don't think that response is an adequate rebuttal of the Fractal of Bad Design article. The "rebuttal" is closer to apologetics, and it starts out by basically denying the idea that language design matters.

Admittedly, the author of that post lost me pretty early on when he said that languages don't need to be predictable, it's on developers to learn everything about how and why a language implemented things they way they're implemented, and complaining just means you're lazy. Sorry, but when I can guess at syntax in Python or Ruby and be right(because the languages were designed to be predictable and consistent), I don't want to consult arcane documentation in PHP to figure out why things don't work the way I expect them to work.

The author is also pretty rude and flippant, often when he's not even right. He ignores things like the Fractal author explicitly saying that Wikipedia and Facebook have very smart developers, so he can say that the PHP "community of amateurs" comment was about those developers. Pretty disingenous.

He repeatedly complains that the author "doesn't understand" "loosely typed" languages, but never considers that maybe the author understands them but thinks they're bad design, hence the whole "fractal of bad design" in the name of the post?

Re:Why People Should Learn Python by Shorel on Wednesday August 24, 2016 @12:21PM (#12353131)
No D in your list?

/ goes to a corner to cry...

Re:Why People Should Learn Python by na85 on Wednesday August 24, 2016 @10:19AM (#12352197)
Node.js isn't a language.