3 ms·
A a lot of these start-up (except for Facebook maybe ) are using python in their stack, why is that ? all I hear about around me is "Java Java Java". What makes
by camus 13y ago
A a lot of these start-up (except for Facebook maybe ) are using python in their stack, why is that ? all I hear about around me is "Java Java Java". What makes python better ? ( it is just a question ). Or is python just for mvp then the stack moves to Java ( like Twitter did with rails )?
- kaoD 13y agoI'd advise against Python. There are too many caveats in it for a language that's supposed not to surprise me. My biggest gripe: it's easy to shoot yourself in the foot using Unicode. The system is cumbersome and the lack of typing makes it easy to slip a regular ASCII string somewhere, which will jump at your face when you expect it the least morphed into a stack trace. The data structures' API is the worst and most inconsistent API I've ever seen. Why is 'dict' not 'Dict' ? A comma ending a line actually makes a tuple, that's asking for trouble. I've witnessed more than one bug caused by this. It is slow and resource hungry. Django is too[1]. GlobalInterpreterLock[2]. The package system is horrible, and pip won't save your day either. I love Clojure and Node.js just because of Leiningen/NPM. I couldn't use PyOpenGL in Windows from some unknown reason. I gave up! Discourages functional programming, while encouraging ugly inline list comprehensions. The solution to the half-assed closures in Python2.7[3] was to introduce 'nonloncal'. Lists are mutable. Object Orientation feels clunky to me and using super is awkward. "Batteries included" but core libraries won't take you too far. Unfortunately they're still bloating the language. Concurrency is hard. Twisted solves it a bit but... meh... What I like: - Proper nested comprehensions (CoffeeScript completely blew this one...) - I like the minimal syntax, it helps me visualize the program better. - PyLint/PyFlakes highlights lines that don't conform to PEP8. - Generators. [1] http://www.techempower.com/benchmarks/#section=data-r5 http://www.techempower.com/benchmarks/#section=data-r5 [2] http://ynniv.com/blog/2007/08/closures-in-python.html http://ynniv.com/blog/2007/08/closures-in-python.html (section Caveats) [3] http://wiki.python.org/moin/GlobalInterpreterLock http://wiki.python.org/moin/GlobalInterpreterLock
- jzwinck 13y agoWhat would you use instead of Python? It should be roughly comparable in terms of having a wide array of well-used libraries, and of course a good REPL. I've been using Python for a couple years and it's mostly joyful. It is unfortunate that not even the various containers within "collections" use a uniform naming convention, I'll give you that. And some of the scoping stuff is weird (nonlocal which nobody really uses? and seemingly-but-not constant default function arguments). But Twisted is a pretty good evented programming system, and NumPy plus multiprocessing let you process a lot of data efficiently, GIL or no. I cannot agree that "the core libraries won't take you too far"--they've taken me farther than the comparable bits in any other language.
- lmm 13y agoI used to be a huge python fan but after a couple of years of scala I don't want to go back. The syntax can be almost as lightweight, the typing is just a huge help as your project gets bigger, and the whole language just feels a little more consistent, with fewer weird corner cases like the default arguments thing you mention.
- Ziomislaw 13y agoSupposedly many python programmers are switching to Go (devs were suprised too).
- w0utert 13y agoThere's nothing in your list that makes Python less suitable for web development than [insert favorite language]. Many of the issues you describe (I agree with most but not all) are either irrelevant for web application development (e.g. the GIL, I/O bound code such as web applications do not suffer from it at all, especially not when using something like gevent), easily avoided or worked around (unicode strings: either use Python 3, or a web framework that defaults to always unicode + do static source analysis for non-unicode string literals), already have pretty good solutions (package management: always use virtualenv and pip), or a matter of style/taste (dict vs Dict, functional aspects, etc). I could make my own list of reasons why I think Java sucks for web development, but someone who's proficient in Java web application development will disagree with those just the same. Every language has its faults, and Python is no exception. Personally I simply hate writing Java code, of all the languages I've used, it's by far the least enjoyable to write and maintain.
- angersock 13y agonah, ruby is pretty much perfect hth (the slowness of the interpreter allows you time to appreciate its beauty)
- darkarmani 13y ago> A comma ending a line actually makes a tuple, that's asking for trouble. I've witnessed more than one bug caused by this. Spurious symbols at the end of a line is really a complaint? Have you ever forgotten a semi-colon in c/c++ code?