5 ms·
As a huge fan of Python, my go-to statement is that Python is the second or third best language for whatever you want to do. Want to do web server development?
by legostormtroopr 8y ago
As a huge fan of Python, my go-to statement is that Python is the second or third best language for whatever you want to do.
Want to do web server development? Flask, Django, Tornado, etc... can do that. Probably not as concurrently as Go, but it'll do.
Scientific computing? Its no Matlab, but the syntax is easy and the time you lose in processing you make up for when developing.
Desktop computing? PyQT is pretty good. Electron may be faster to build with, C will be faster at runtime, but Python, even with Tkinter, is ok.
Functional programming? There are list comprehensions, map, reduce and filter. Not as good as Haskell or Lisp, but it'll do.
Python isn't the killer language for any of these really, but its good enough in almost all cases that you'll be very productive and can iterate to a good MVP quicker than with most other languages.
- zimablue 8y agoIt's the killer language in scientific computing I'd say, having used both Python and Matlab. The open source nature/libraries and being a more fully-powered programming language (expressive object system) make it better.
- dagw 8y agoAs someone who does a lot of scientific computing in Python, I'd probably recommend learning Julia as the 'killer language' if scientific computing is the main reason you want to learn programming. Pythons strength comes from being pretty good at scientific computing, and equally good at just about everything else.
- zimablue 8y agoI haven't tried Julia, it sounds like it could be better in the long run but I'd be shocked if the ecosystem is equivalent already.
- ForHackernews 8y agoLuckily, you can call many Python libraries directly from your Julia code: https://github.com/JuliaPy/PyCall.jl https://github.com/JuliaPy/PyCall.jl
- dagw 8y agoYea, PyCall makes it trivial to write a quick Julia wrapper around a python library. It's also really handy for porting python code to Julia. Start by wrapping all your existing functions with PyCall and then replace them one by one with Julia functions.
- 3rdAccount 8y agoWas going to say that Julia might be the long term best open source replacement for closed source scientific computing (Matlab, Mathematica...etc). In some ways it is already just as good, but in others, it has a long way to go. From a speed perspective, it is top notch.
- dazzawazza 8y agoFor me python's killer feature is readability years later. I've gone back to websites and tools YEARS later and the code as quick to pickup and easy to modify. 35 years of programming and I've never met a language so well integrated with my mind.
- deaps 8y ago> 35 years of programming and I've never met a language so well integrated with my mind. That's a pretty good way to put it - and mirrors my feelings. I've been programming for 20+ years (with breaks here and there), and it took a while for me to find Python. But when I found it, it's like I finally found the language that my brain thinks in.
- mazesc 8y agoAny language with static types should be easier to make sense of, though. I get it's faster to write dynamically typed code, but your point is specifically about reading code, which I can't follow. Of course Python nowadays has support for static types too.
- realharo 8y ago>I get it's faster to write dynamically typed code I would dispute that, but I guess it depends on one's workflow. Different workflows work better with different kinds of type systems.
- weberc2 8y agoI program in Python professionally, and I agree with your sentiment in general. Dynamic types hurt readability. Also, in general, Python is faster to develop with than most statically typed languages. There are two nits that I’d like to pick: the first and lesser is that Python’s static typing story is in an alpha stage. It’s not ready for prime time (but I’m cheering it on) and Python shouldn’t be considered as having a static type system yet. The second is that I realized that Go is a statically typed language that is quite a lot easier to develop with than Python and other dynamic languages. It strikes a good balance between protecting you from mistakes while not making it hard to express your intent (most of the time, anyway). As I advance and become more concerned about my time, I find myself reaching for Go more often because the static type system has my back. I spend less time writing unit tests or iteratively running my code to make sure things still work. (People said this about Haskell and Rust and OCaml too, so I understand the skepticism dynamic language proponents have for claims like these). The deployment, dependency management, and performance stories are also quite a lot nicer in Go, and these are undervalued components of “developing velocity” as well, especially if you’re on a small team. It really changes the calculus for static vs dynamic language discussions.
- 3rdAccount 8y agoI was going to say "no" to embedded, but micro python and other projects work on some controllers I think.
- jononor 8y agoIn the microcontroller it is good enough for hobby/proof-of-concept level things. Same as the various Javascript engines. Lua might actually be doable for some simple products. But a lot of embedded these days is on Linux, and then Python is pretty great.
- sibinpthomas 8y agoSeems like this applies here - https://www.ribbonfarm.com/2018/04/24/survival-of-the-mediocre-mediocre/ https://www.ribbonfarm.com/2018/04/24/survival-of-the-medioc...