News for hackers. Stuff that matters.
Re:Python at Netflix by tootie on Monday March 11, 2013 @02:28PM (#5358691)
I have to say that after doing a python project I totally don't get why people love it so much. The syntax is slightly cleaner, but the lack of threading, first-class functions and dependency management tools make it waste at least as much time as it saves. I honestly don't believe in the concept of a programming language being able to make code more or less readable. A Java project with a POM file can be up and running on any OS in about 5 minutes.
Re:Python at Netflix by frankwiles on Monday March 11, 2013 @02:41PM (#5358783)
Ummm, not sure where you're getting your information but Python has threads (http://docs.python.org/2/library/threading.html), first-class functions (http://en.wikipedia.org/wiki/First-class_function), and dependency management tools (google for pip, easy_install, etc.)
Re:Python at Netflix by tootie on Monday March 11, 2013 @03:44PM (#5359150)
Sorry, I should have said "lack of true threading in CPython" by which I mean the GIL limitation. And lambda expressions are lame compared to what you can do in JavaScript/Perl/Scala. And the build tools suck compared to Maven which is saying a lot. Maven is cross-platform and install-free. It takes a long time to makes head and tails of pip, easy_install and virtualenv and it still does less than Maven.
Re:Python at Netflix by SilasX on Monday March 11, 2013 @04:02PM (#5359231)
>And lambda expressions are lame compared to what you can do in JavaScript/Perl/Scala.

Python lets you pass functions other ways than using lambdas, you know. If you've defined a function with the standard "def foo" style, you can pass "foo" as an argument.

Even the standard "1-line lambdas LOL" limitation can be circumvented by defining the function elsewhere and making the lambda a call to it.

Re:Python at Netflix by jamiltron on Tuesday March 12, 2013 @01:12AM (#5360327)
Lambda expressions are not necessarily first-class functions (I mean, they are in Python, but so is any other old function).

First class functions simply mean that a language treats functions as it would nearly any other data type, namely that they may be passed as parameters, bound to variables, and returned from other functions.

Python's poor handling of lambda expressions do not invalidate that functions are first-class citizens.

Re:Python at Netflix by rdtsc on Monday March 11, 2013 @11:28PM (#5359927)
What do you use "true" threading for? Are you multiplying matrices? If so use Numpy. Are you downloading data and accessing database? If so, you threading, threading in Python works great for that. If you hit memory size issues, switch to gevent or eventlet for green threads.

I have been building large projects in Python for the last 10 yeas and never really thought "Hmm I wish I had more powerful lambda functions". You can always just have regular function and pass that around. Why do you need lambdas so much?

Re:Python at Netflix by herge on Monday March 11, 2013 @03:27PM (#5359054)
I think he was talking about threads that run on multiple processors.

Also, packaging is a whole different can of worms (but hopefully will be sorted by distutils2!).

Re:Python at Netflix by brown9-2 on Monday March 11, 2013 @02:41PM (#5358776)
Python doesn't have first class functions?
Re:Python at Netflix by maxerickson on Monday March 11, 2013 @03:09PM (#5358951)
I often get the idea that people confuse anonymous and first class functions (apparently because they discover the latter expressed in terms of the former).
Re:Python at Netflix by mixmastamyk on Monday March 11, 2013 @02:53PM (#5358852)
It has its share of warts, but doesn't lack any of those things you mention.

Java shines at the huge end, but for most everything else python is a more productive choice as it is so much more concise. Perhaps you are not yet using it optimally?

Re:Python at Netflix by nightpool on Monday March 11, 2013 @02:41PM (#5358780)
a) python-pip combined with virtualenv gives very good requirement support.

b) python does have first class functions?

c) threading still happens, you just can't take advantage of multiple cores. This isn't as big of a problem as you'd think though, you can still write very fast code.